class method
self.new
Ruby on Rails 8.1.2
Since v3.0.20Signature
self.new(parent = nil)
No documentation comment.
Parameters
-
parentopt = nil
Source
# File activesupport/lib/active_support/ordered_options.rb, line 90
def initialize(parent = nil)
@parent = parent
if @parent.kind_of?(OrderedOptions)
# use the faster _get when dealing with OrderedOptions
super() { |h, k| @parent._get(k) }
elsif @parent
super() { |h, k| @parent[k] }
else
super()
@parent = {}
end
end
Defined in activesupport/lib/active_support/ordered_options.rb line 90
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::InheritableOptions