We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d56a0e + 1a63f94 commit a792a62Copy full SHA for a792a62
activesupport/lib/active_support/ordered_options.rb
@@ -84,6 +84,12 @@ def inspect
84
# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' })
85
# h.girl # => 'Mary'
86
# h.boy # => 'John'
87
+ #
88
+ # If the existing hash has string keys, call Hash#symbolize_keys on it.
89
90
+ # h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys)
91
+ # h.girl # => 'Mary'
92
+ # h.boy # => 'John'
93
class InheritableOptions < OrderedOptions
94
def initialize(parent = nil)
95
if parent.kind_of?(OrderedOptions)
0 commit comments