Class: ConfigSL::FileFormat::Yaml
- Defined in:
- lib/configsl/file_format/yaml.rb
Overview
Support for YAML files.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ConfigSL::FileFormat::Base
Class Method Details
.extensions ⇒ Object
11 12 13 |
# File 'lib/configsl/file_format/yaml.rb', line 11 def self.extensions i[yaml yml] end |
Instance Method Details
#read ⇒ Object
15 16 17 18 19 |
# File 'lib/configsl/file_format/yaml.rb', line 15 def read ::YAML.load_file(@file, symbolize_names: true).each do |name, value| yield name, value if block_given? end end |