Module: YamlStrings
- Defined in:
- lib/yaml_strings.rb,
lib/yaml_strings/version.rb
Constant Summary collapse
- VERSION =
"0.0.5"
Class Method Summary collapse
Class Method Details
.strings_to_hash(string_file) ⇒ Object
14 15 16 17 |
# File 'lib/yaml_strings.rb', line 14 def strings_to_hash(string_file) strings_array = File.readlines(string_file) StringsToHashEncoder.new(strings_array).to_hash end |
.yaml_to_strings(yaml_file) ⇒ Object
9 10 11 12 |
# File 'lib/yaml_strings.rb', line 9 def yaml_to_strings(yaml_file) yaml_hash = YAML.load(File.open(yaml_file)) YamlToStringsEncoder.new(yaml_hash).to_s end |