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)



62
63
64
65
66
67
68
69
# File 'lib/trestle/configurable.rb', line 62

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