Module: Configify::Config::InstanceMethods

Defined in:
lib/configify/config.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *args) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/configify/config.rb', line 26

def method_missing(method_id, *args)
  if !self.respond_to? method_id
    attribute = method_id.to_s.gsub(/\=/, "")
    self.class.send :attr_accessor, attribute
    self.send(method_id, args.first)
  else
    super
  end
end