Class: ImportEverything::YamlParser

Inherits:
Parser show all
Defined in:
lib/import_everything/parsers/yaml_parser.rb

Instance Method Summary collapse

Instance Method Details

#value_hashesObject



4
5
6
7
8
9
10
# File 'lib/import_everything/parsers/yaml_parser.rb', line 4

def value_hashes
  require 'yaml'
  parsed = YAML::load(str)
  parsed.map do |root_val,row|
    row.merge("root" => root_val)
  end
end