Class: Messiah::Config
- Inherits:
-
Object
- Object
- Messiah::Config
- Defined in:
- lib/messiah/config.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key, *val, &block) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/messiah/config.rb', line 8 def method_missing(key, *val, &block) @values ||= {} if val.first || block @values[key.to_s.gsub(/=/, '')] = val.first || block else @values[key.to_s] end end |
Instance Attribute Details
#values ⇒ Object
Returns the value of attribute values.
2 3 4 |
# File 'lib/messiah/config.rb', line 2 def values @values end |
Instance Method Details
#respond_to?(key) ⇒ Boolean
4 5 6 |
# File 'lib/messiah/config.rb', line 4 def respond_to?(key) true end |