Class: OrderedOptions

Inherits:
OrderedHash show all
Defined in:
lib/initializer.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from OrderedHash

#keys

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



603
604
605
606
607
608
609
# File 'lib/initializer.rb', line 603

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



599
600
601
# File 'lib/initializer.rb', line 599

def [](key)
  super(key.to_sym)
end

#[]=(key, value) ⇒ Object



595
596
597
# File 'lib/initializer.rb', line 595

def []=(key, value)
  super(key.to_sym, value)
end