Class: OptParseValidator::OptionsFile::YML
- Defined in:
- lib/opt_parse_validator/options_file/yml.rb
Overview
Yaml Implementation
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#parse ⇒ Hash
A { key: value } hash.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OptParseValidator::OptionsFile::Base
Instance Method Details
#parse ⇒ Hash
Returns a { key: value } hash.
8 9 10 |
# File 'lib/opt_parse_validator/options_file/yml.rb', line 8 def parse Hash[YAML.load_file(path).map { |k, v| [k.to_sym, v] }] end |