Module: Trestle::Configurable::Open

Defined in:
lib/trestle/configurable.rb

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (protected)



89
90
91
92
93
94
95
96
# File 'lib/trestle/configurable.rb', line 89

def method_missing(name, *args, &block)
  if name =~ /(.*)\=$/
    key, value = $1, args.first
    options[key.to_sym] = value
  else
    options[name.to_sym] ||= self.class.new
  end
end