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



615
616
617
618
619
620
621
# File 'lib/initializer.rb', line 615

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



611
612
613
# File 'lib/initializer.rb', line 611

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

#[]=(key, value) ⇒ Object



607
608
609
# File 'lib/initializer.rb', line 607

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