Sha256: 159f20e12506e0916f3469a86e4b5744d6cda1a86d1c145a98359cd080826632

Contents?: true

Size: 409 Bytes

Versions: 12

Compression:

Stored size: 409 Bytes

Contents

module Gdshowsdb
  class SongRefYAMLParser
    def self.from_yaml
      SongRefYAMLParser.new(Gdshowsdb.load_yaml('song_refs.yaml'))
    end

    def initialize(song_ref_list)
      @song_ref_list = song_ref_list
    end

    def parse
      @song_ref_list.map do |song_ref|
        key = song_ref.keys.first
        value = song_ref[key]
        { uuid: value, name: key }
      end        
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gdshowsdb-4.0.2 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-4.0.1 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-4.0.0 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-3.0.0 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-2.1.0 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-2.0.0 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-1.0.3 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-1.0.2 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-1.0.1 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-1.0.0 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-0.9.1 lib/gdshowsdb/song_ref_yaml_parser.rb
gdshowsdb-0.9.0 lib/gdshowsdb/song_ref_yaml_parser.rb