Class: Blanket::Reader
- Inherits:
-
Object
- Object
- Blanket::Reader
- Defined in:
- lib/blanket/config/reader.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Reader
constructor
A new instance of Reader.
- #keys ⇒ Object
- #method_missing(symbol) ⇒ Object
Constructor Details
#initialize(path) ⇒ Reader
Returns a new instance of Reader.
4 5 6 7 |
# File 'lib/blanket/config/reader.rb', line 4 def initialize(path) @path = path @attributes = YAML.load_file(@path) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol) ⇒ Object
9 10 11 12 13 |
# File 'lib/blanket/config/reader.rb', line 9 def method_missing(symbol) @attributes[symbol.to_s] rescue nil end |
Class Method Details
Instance Method Details
#keys ⇒ Object
15 16 17 |
# File 'lib/blanket/config/reader.rb', line 15 def keys blanket_type.attribute_symbols end |