BigW Consortium Gitlab

Commit 32a70410 by Douwe Maan

ActiveSupport delegation is preferred over Forwardable

parent 56c5b211
......@@ -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"
......
# Gitlab::Git::Repository is a wrapper around native Rugged::Repository object
require 'forwardable'
require 'tempfile'
require 'forwardable'
require "rubygems/package"
......@@ -7,7 +6,6 @@ require "rubygems/package"
module Gitlab
module Git
class Repository
extend Forwardable
include Gitlab::Git::Popen
SEARCH_CONTEXT_LINES = 3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment