Class: Confy::Backend::Xml
- Inherits:
-
Hash
- Object
- Hash
- Confy::Backend::Xml
- Defined in:
- lib/confy/backend/xml.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ Xml
constructor
A new instance of Xml.
- #method_missing(*args) ⇒ Object
Constructor Details
#initialize(path) ⇒ Xml
5 6 7 8 |
# File 'lib/confy/backend/xml.rb', line 5 def initialize path require "crack/xml" @config = ::Crack::XML.parse(::File.read(path)).to_ostruct end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
10 11 12 |
# File 'lib/confy/backend/xml.rb', line 10 def method_missing *args @config.send args.shift end |