Class: AhlScraper::SkaterGameListItem
- Inherits:
-
Resource
- Object
- Resource
- AhlScraper::SkaterGameListItem
show all
- Defined in:
- lib/ahl_scraper/resources/skater_game_list_item.rb
Instance Method Summary
collapse
Methods inherited from Resource
#[], #each, #inspect, #keys, #to_json, #values
Constructor Details
Returns a new instance of SkaterGameListItem.
5
6
7
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 5
def initialize(raw_data, opts = {})
super(raw_data, opts)
end
|
Instance Method Details
#assists ⇒ Object
49
50
51
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 49
def assists
@assists ||= @raw_data[:row][:assists].to_i
end
|
#date ⇒ Object
17
18
19
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 17
def date
@date ||= @raw_data[:row][:date_played]
end
|
#game_id ⇒ Object
9
10
11
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 9
def game_id
@game_id ||= @raw_data[:prop][:game][:gameLink].to_i
end
|
#game_name ⇒ Object
13
14
15
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 13
def game_name
@game_name ||= @raw_data[:row][:game]
end
|
#game_winning_goals ⇒ Object
41
42
43
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 41
def game_winning_goals
@game_winning_goals ||= @raw_data[:row][:gw].to_i
end
|
#goals ⇒ Object
25
26
27
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 25
def goals
@goals ||= @raw_data[:row][:goals].to_i
end
|
#goals_pp ⇒ Object
29
30
31
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 29
def goals_pp
@goals_pp ||= @raw_data[:row][:pp].to_i
end
|
#goals_sh ⇒ Object
33
34
35
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 33
def goals_sh
@goals_sh ||= @raw_data[:row][:sh].to_i
end
|
#penalty_minutes ⇒ Object
61
62
63
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 61
def penalty_minutes
@penalty_minutes ||= @raw_data[:row][:penalty_minutes].to_i
end
|
#plus_minus ⇒ Object
45
46
47
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 45
def plus_minus
@plus_minus ||= @raw_data[:row][:plusminus].to_i
end
|
#points ⇒ Object
37
38
39
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 37
def points
@points ||= @raw_data[:row][:points].to_i
end
|
#shootout_attempts ⇒ Object
57
58
59
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 57
def shootout_attempts
@shootout_attempts ||= @raw_data[:row][:shootout_attempts].to_i
end
|
#shootout_goals ⇒ Object
53
54
55
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 53
def shootout_goals
@shootout_goals ||= @raw_data[:row][:shootout_goals].to_i
end
|
#shots ⇒ Object
21
22
23
|
# File 'lib/ahl_scraper/resources/skater_game_list_item.rb', line 21
def shots
@shots ||= @raw_data[:row][:shots].to_i
end
|