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)



83
84
85
86
87
88
89
90
# File 'lib/trestle/configurable.rb', line 83

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