Class: Skylark::YAMLConfiguration
- Inherits:
-
Configuration
- Object
- Skylark::YAMLConfiguration
- Defined in:
- lib/skylark/yaml_configuration.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ YAMLConfiguration
constructor
A new instance of YAMLConfiguration.
- #read! ⇒ Object
Constructor Details
#initialize(filename) ⇒ YAMLConfiguration
Returns a new instance of YAMLConfiguration.
11 12 13 14 15 |
# File 'lib/skylark/yaml_configuration.rb', line 11 def initialize(filename) super @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
9 10 11 |
# File 'lib/skylark/yaml_configuration.rb', line 9 def filename @filename end |
Instance Method Details
#read! ⇒ Object
17 18 19 |
# File 'lib/skylark/yaml_configuration.rb', line 17 def read! self.merge!(parse_yaml(read_file(@filename))) end |