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)



56
57
58
59
60
61
62
63
# File 'lib/trestle/configurable.rb', line 56

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