Skip to content
Snippets Groups Projects
Commit 32a70410 authored by Douwe Maan's avatar Douwe Maan
Browse files

ActiveSupport delegation is preferred over Forwardable

parent 56c5b211
No related branches found
No related tags found
No related merge requests found
Loading
@@ -11,14 +11,15 @@ module CacheMarkdownField
Loading
@@ -11,14 +11,15 @@ module CacheMarkdownField
# Knows about the relationship between markdown and html field names, and # Knows about the relationship between markdown and html field names, and
# stores the rendering contexts for the latter # stores the rendering contexts for the latter
class FieldData class FieldData
extend Forwardable
def initialize def initialize
@data = {} @data = {}
end end
   
def_delegators :@data, :[], :[]= delegate :[], :[]=, to: :@data
def_delegator :@data, :keys, :markdown_fields
def markdown_fields
@data.keys
end
   
def html_field(markdown_field) def html_field(markdown_field)
"#{markdown_field}_html" "#{markdown_field}_html"
Loading
Loading
# Gitlab::Git::Repository is a wrapper around native Rugged::Repository object # Gitlab::Git::Repository is a wrapper around native Rugged::Repository object
require 'forwardable'
require 'tempfile' require 'tempfile'
require 'forwardable' require 'forwardable'
require "rubygems/package" require "rubygems/package"
Loading
@@ -7,7 +6,6 @@ require "rubygems/package"
Loading
@@ -7,7 +6,6 @@ require "rubygems/package"
module Gitlab module Gitlab
module Git module Git
class Repository class Repository
extend Forwardable
include Gitlab::Git::Popen include Gitlab::Git::Popen
   
SEARCH_CONTEXT_LINES = 3 SEARCH_CONTEXT_LINES = 3
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment