Class: ActiveSupport::OrderedOptions
- Inherits:
-
OrderedHash
- Object
- Hash
- OrderedHash
- ActiveSupport::OrderedOptions
- Defined in:
- lib/active_support/ordered_options.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from OrderedHash
[], #clear, #delete, #delete_if, #each, #each_key, #each_value, #encode_with, #initialize, #initialize_copy, #inspect, #invert, #keys, #merge, #merge!, #reject, #reject!, #replace, #shift, #to_a, #to_hash, #to_yaml, #to_yaml_type, #values
Methods inherited from Hash
#as_json, #assert_valid_keys, #deep_merge, #deep_merge!, #diff, #encode_json, #except, #except!, #extract!, #extractable_options?, from_xml, #reverse_merge, #reverse_merge!, #slice, #slice!, #stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!, #to_param, #to_xml, #with_indifferent_access
Constructor Details
This class inherits a constructor from ActiveSupport::OrderedHash
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/active_support/ordered_options.rb', line 13 def method_missing(name, *args) if name.to_s =~ /(.*)=$/ self[$1.to_sym] = args.first else self[name] end end |