Class: Configru::StructHash
- Inherits:
-
Hash
- Object
- Hash
- Configru::StructHash
- Defined in:
- lib/configru/structhash.rb
Direct Known Subclasses
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key, *args) ⇒ Object
3 4 5 6 7 |
# File 'lib/configru/structhash.rb', line 3 def method_missing(key, *args) # Raise NoMethodError if the key does not exist super(key, *args) unless args.empty? && self.include?(key.to_s) self[key.to_s] end |