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
Loading
@@ -11,14 +11,15 @@ module CacheMarkdownField
# Knows about the relationship between markdown and html field names, and
# stores the rendering contexts for the latter
class FieldData
extend Forwardable
def initialize
@data = {}
end
 
def_delegators :@data, :[], :[]=
def_delegator :@data, :keys, :markdown_fields
delegate :[], :[]=, to: :@data
def markdown_fields
@data.keys
end
 
def html_field(markdown_field)
"#{markdown_field}_html"
Loading
Loading
# Gitlab::Git::Repository is a wrapper around native Rugged::Repository object
require 'forwardable'
require 'tempfile'
require 'forwardable'
require "rubygems/package"
Loading
Loading
@@ -7,7 +6,6 @@ require "rubygems/package"
module Gitlab
module Git
class Repository
extend Forwardable
include Gitlab::Git::Popen
 
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