Class: Burn::Configuration::ConfigBase

Inherits:
Object
  • Object
show all
Defined in:
lib/burn/config/config_base.rb

Direct Known Subclasses

App, Server

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_symbol, *args, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/burn/config/config_base.rb', line 4

def method_missing(method_symbol, *args, &block)
  if instance_variables.include?("@#{method_symbol}".to_sym) then
    if args.count>0 then
      self.instance_variable_set "@#{method_symbol}", args[0]
    else
      self.instance_variable_get "@#{method_symbol}"
    end
  end
end