Class: ActiveSupport::OrderedOptions
- Inherits:
-
OrderedHash
- Object
- Array
- OrderedHash
- ActiveSupport::OrderedOptions
- Defined in:
- lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from OrderedHash
#delete, #has_key?, #has_value?, #keys, #to_hash, #values
Methods inherited from Array
#count, #include?, #invert, #parse_splat_args, #random_each, #randomize, #randomize!, #subset?, #superset?
Methods included from CoreExtensions::Array::RandomAccess
Methods included from CoreExtensions::Array::Grouping
#in_groups, #in_groups_of, #split
Methods included from CoreExtensions::Array::ExtractOptions
Methods included from CoreExtensions::Array::Conversions
included, #to_formatted_s, #to_param, #to_query, #to_sentence, #to_xml
Methods included from CoreExtensions::Array::Access
#fifth, #forty_two, #fourth, #from, #second, #third, #to
Methods included from English::Array
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb', line 11 def method_missing(name, *args) if name.to_s =~ /(.*)=$/ self[$1.to_sym] = args.first else self[name] end end |
Instance Method Details
#[](key) ⇒ Object
7 8 9 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb', line 7 def [](key) super(key.to_sym) end |
#[]=(key, value) ⇒ Object
3 4 5 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb', line 3 def []=(key, value) super(key.to_sym, value) end |