class QueryCustomFieldColumn < QueryColumn
def initialize(custom_field, options={})
- self.name = "cf_#{custom_field.id}".to_sym
- self.sortable = custom_field.order_statement || false
- self.totalable = options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable?
- @inline = custom_field.full_width_layout? ? false : true
+ name = "cf_#{custom_field.id}".to_sym
+ super(
+ name,
+ :sortable => custom_field.order_statement || false,
+ :totalable => options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable?,
+ :inline => custom_field.full_width_layout? ? false : true
+ )
@cf = custom_field
end
# Initialize with a Diff file and the type of Diff View
# The type view must be inline or sbs (side_by_side)
def initialize(type="inline", style=nil)
+ super()
@parsing = false
@added = 0
@removed = 0
@login = login if login && !login.empty?
@password = (password || "") if @login
@root_url = root_url.blank? ? retrieve_root_url : root_url
+ @path_encoding = path_encoding.presence || 'UTF-8'
end
def adapter_name
end
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
- @url = url
- @root_url = url
- @path_encoding = 'UTF-8'
- # do not call *super* for non ASCII repository path
+ super(url, url, nil, nil, 'UTF-8')
end
def bzr_path_encodig=(encoding)
# password -> unnecessary too
def initialize(url, root_url=nil, login=nil, password=nil,
path_encoding=nil)
- @path_encoding = path_encoding.presence || 'UTF-8'
- @url = url
# TODO: better Exception here (IllegalArgumentException)
raise CommandFailed if root_url.blank?
- @root_url = root_url
-
- # These are unused.
- @login = login if login && !login.empty?
- @password = (password || "") if @login
+ super
end
def path_encoding
def initialize(url, root_url=nil, login=nil, password=nil,
path_encoding=nil)
- @url = with_trailing_slash(url)
- @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
+ super(with_trailing_slash(url), nil, nil, nil, path_encoding)
end
def path_encoding
end
end
- def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
- super
- @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
- end
-
def path_encoding
@path_encoding
end
end
end
- def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
- super
- @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
- end
-
def path_encoding
@path_encoding
end
# Syntax highlighting is completed within each line.
class CustomHTMLLinewise < ::Rouge::Formatter
def initialize(formatter)
+ super()
@formatter = formatter
end
module Twofa
class Base
def self.inherited(child)
+ super
# require-ing a Base subclass will register it as a 2FA scheme
Redmine::Twofa.register_scheme(scheme_name(child), child)
end
attr_reader :diff_type, :diff_style
def initialize(diff, options={})
+ super()
options.assert_valid_keys(:type, :style, :max_lines)
diff = diff.split("\n") if diff.is_a?(String)
@diff_type = options[:type] || 'inline'
class WikiTags < ::Loofah::Scrubber
def initialize(tags_to_text)
- @direction = :bottom_up
+ super(:direction => :bottom_up)
@tags_to_text = tags_to_text || {}
end