class InheritableOptions
Ruby on Rails 8.0.4
Since v3.0.20Inheritable Options
InheritableOptions provides a constructor to build an OrderedOptions hash inherited from another hash.
Use this if you already have some hash and you want to create a new one based on it.
h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) h.girl # => 'Mary' h.boy # => 'John'
If the existing hash has string keys, call Hash#symbolize_keys on it.
h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) h.girl # => 'Mary' h.boy # => 'John'
Inherits from
Methods (defined here)
- # ==
- # each
- # inheritable_copy
- # inspect
- # key?
- # overridden?
- # own_key?
- # pretty_print
- # to_a
- # to_h
- # to_s
- self. new
Used by
Subclasses (1)
Methods (inherited)
From ActiveSupport::OrderedOptions (8)
- # []
- # []=
- # _get
- # dig
- # extractable_options?
- # inspect
- # method_missing
- # respond_to_missing?
From Hash (35)
- # assert_valid_keys
- # compact_blank!
- # deep_dup
- # deep_merge
- # deep_merge!
- # deep_stringify_keys
- # deep_stringify_keys!
- # deep_symbolize_keys
- # deep_symbolize_keys!
- # deep_transform_keys
- # deep_transform_keys!
- # deep_transform_values
- # deep_transform_values!
- # except!
- # extract!
- # extractable_options?
- # nested_under_indifferent_access
- # reverse_merge
- # reverse_merge!
- # reverse_update
- # slice!
- # stringify_keys
- # stringify_keys!
- # symbolize_keys
- # symbolize_keys!
- # to_options
- # to_options!
- # to_param
- # to_query
- # to_xml
- # with_defaults
- # with_defaults!
- # with_indifferent_access
- self. from_trusted_xml
- self. from_xml
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::NumericWithFormat (2)
- # to_formatted_s
- # to_fs