Sha256: aff541372082e140456a214641fe6fb022b0426f4066ffa61075ee753bbe42ad

Contents?: true

Size: 830 Bytes

Versions: 12

Compression:

Stored size: 830 Bytes

Contents

# frozen_string_literal: true

module AhlScraper
  module PlayoffBrackets
    class Game < Resource
      def id
        @id ||= @raw_data[:game_id].to_i
      end

      def home_team
        @home_team ||= @raw_data[:home_team].to_i
      end

      def home_score
        @home_score ||= @raw_data[:home_goal_count].to_i
      end

      def away_team
        @away_team ||= @raw_data[:visiting_team].to_i
      end

      def away_score
        @away_score ||= @raw_data[:visiting_goal_count].to_i
      end

      def status
        @status ||= @raw_data[:game_status]
      end

      def date
        @date ||= @raw_data[:date_time]
      end

      def if_necessary?
        @if_necessary ||= @raw_data[:if_necessary] == "1"
      end

      def notes
        @notes ||= @raw_data[:game_notes]
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ahl_scraper-0.4.0 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.8 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.7 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.6 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.5 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.4 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.3 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.2 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.1 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.3.0 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.2.0 lib/ahl_scraper/resources/playoff_brackets/game.rb
ahl_scraper-0.1.1 lib/ahl_scraper/resources/playoff_brackets/game.rb