Class: B1Config::Options
- Inherits:
-
Object
- Object
- B1Config::Options
- Defined in:
- lib/b1_config/options.rb
Constant Summary collapse
- DATA =
{}
Class Method Summary collapse
-
.method_missing(meth, *args, &block) ⇒ Object
Check if hash of options include the requested option.
-
.update_data(data) ⇒ Object
Update hash of options.
Class Method Details
.method_missing(meth, *args, &block) ⇒ Object
Check if hash of options include the requested option
13 14 15 |
# File 'lib/b1_config/options.rb', line 13 def self.method_missing meth, *args, &block DATA.has_key?(meth.to_s) ? DATA[meth.to_s] : (raise B1Config::Exception.new(2,{meth:meth})) end |
.update_data(data) ⇒ Object
Update hash of options
7 8 9 10 |
# File 'lib/b1_config/options.rb', line 7 def self.update_data data data = data.kind_of?(Hash) ? data : {} DATA.merge! data end |