lib/ahl_scraper/resources/games/penalty.rb in ahl_scraper-0.2.0 vs lib/ahl_scraper/resources/games/penalty.rb in ahl_scraper-0.3.0
- old
+ new
@@ -2,11 +2,11 @@
module AhlScraper
module Games
class Penalty < Resource
def id
- @id ||= @raw_data.dig(:game_penalty_id)&.to_i
+ @id ||= @raw_data[:game_penalty_id]&.to_i
end
def number
@number ||= @opts[:number]
end
@@ -76,10 +76,10 @@
def power_play?
@raw_data[:isPowerPlay]
end
def bench?
- @raw_data[:isPowerPlay]
+ @raw_data[:isBench]
end
def invalid?
[240_773].include? id
end