Class: Confy::Backend::Yaml
- Inherits:
-
Hash
- Object
- Hash
- Confy::Backend::Yaml
- Defined in:
- lib/confy/backend/yaml.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ Yaml
constructor
A new instance of Yaml.
- #method_missing(*args) ⇒ Object
Constructor Details
#initialize(path) ⇒ Yaml
Returns a new instance of Yaml.
4 5 6 7 |
# File 'lib/confy/backend/yaml.rb', line 4 def initialize path require "yaml" @config = ::YAML.load_file(path).to_ostruct end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
9 10 11 |
# File 'lib/confy/backend/yaml.rb', line 9 def method_missing *args @config.send args.shift end |