Class: Smess::Config
- Inherits:
-
Object
- Object
- Smess::Config
- Defined in:
- lib/smess.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Config
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 |