Sha256: ab621652e626674e037fb3e710ef328b8c140ae7621853262383aa7b937ed308
Contents?: true
Size: 572 Bytes
Versions: 12
Compression:
Stored size: 572 Bytes
Contents
module Gdshowsdb class SongYAMLParser def self.from_yaml(year) SongYAMLParser.new(Gdshowsdb.load_yaml_for_year(year)) end def initialize(shows) @shows = shows end def parse parsed = [] @shows.each do |key, value| sets = value[:sets] sets.each do |set| songs = set[:songs] songs.each_with_index do |song, i| parsed << song.merge({position: i, show_set_uuid: set[:uuid]}) end if songs end if sets end parsed end end end
Version data entries
12 entries across 12 versions & 1 rubygems