Sha256: 766f5a4049d5f2434df4d4b2e84fb30d4a78e4138e15c0e1a6d7e3bc5e14a574

Contents?: true

Size: 600 Bytes

Versions: 12

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module AhlScraper
  module Games
    class Period < Resource
      def number
        @number ||= @raw_data[:info][:id].to_i
      end

      def name
        @name ||= @raw_data[:info][:longName]
      end

      def home_goals
        @home_goals ||= @raw_data[:stats][:homeGoals]
      end

      def home_sog
        @home_sog ||= @raw_data[:stats][:homeShots]
      end

      def away_goals
        @away_goals ||= @raw_data[:stats][:visitingGoals]
      end

      def away_sog
        @away_sog ||= @raw_data[:stats][:visitingShots]
      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/games/period.rb
ahl_scraper-0.3.8 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.7 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.6 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.5 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.4 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.3 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.2 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.1 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.3.0 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.2.0 lib/ahl_scraper/resources/games/period.rb
ahl_scraper-0.1.1 lib/ahl_scraper/resources/games/period.rb