Class: Smess::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/smess.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig



45
46
47
# File 'lib/smess.rb', line 45

def initialize
  @config=Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



48
49
50
51
52
53
54
# File 'lib/smess.rb', line 48

def method_missing(method,*args,&block)
  method = method.to_s.gsub(/[=]/,'')
  if args.length>0
    @config[method] = args.first
  end
  @config[method]
end