Sha256: bbcbdfe17d0edf6d5c566d843904355d4ab467b61e7858815f5ae6db74219548

Contents?: true

Size: 491 Bytes

Versions: 12

Compression:

Stored size: 491 Bytes

Contents

module Gdshowsdb
  class ShowYAMLParser
    def self.from_yaml(year)
      ShowYAMLParser.new(Gdshowsdb.load_yaml_for_year(year))
    end

    def initialize(shows)
      @shows = shows
    end

    def parse
      parsed = []
      @shows.each do |key, value|
        date_info = Show.parse_date(key)
        parsed.push(date_info.merge({uuid: value[:uuid], venue: value[:venue], city: value[:city], state: value[:state], country: value[:country]}))
      end
      parsed
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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