Class: AhlScraper::GoalieGameListItem
- Inherits:
-
Resource
- Object
- Resource
- AhlScraper::GoalieGameListItem
show all
- Defined in:
- lib/ahl_scraper/resources/goalie_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 GoalieGameListItem.
5
6
7
8
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 5
def initialize(raw_data, opts = {})
super(raw_data, opts)
@raw_data = raw_data
end
|
Instance Method Details
#date ⇒ Object
18
19
20
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 18
def date
@date ||= @raw_data[:row][:date_played]
end
|
#game_id ⇒ Object
10
11
12
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 10
def game_id
@game_id ||= @raw_data[:prop][:game][:gameLink].to_i
end
|
#game_name ⇒ Object
14
15
16
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 14
def game_name
@game_name ||= @raw_data[:row][:game]
end
|
#goals_against ⇒ Object
22
23
24
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 22
def goals_against
@goals_against ||= @raw_data[:row][:goals_against].to_i
end
|
#goals_against_average ⇒ Object
34
35
36
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 34
def goals_against_average
@goals_against_average ||= @raw_data[:row][:gaa].to_f
end
|
#minutes ⇒ Object
42
43
44
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 42
def minutes
@minutes ||= @raw_data[:row][:minutes]
end
|
#result ⇒ Object
46
47
48
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 46
def result
@result ||= set_result
end
|
#save_percent ⇒ Object
38
39
40
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 38
def save_percent
@save_percent ||= @raw_data[:row][:svpct].to_f
end
|
#saves ⇒ Object
30
31
32
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 30
def saves
@saves ||= @raw_data[:row][:saves].to_i
end
|
#shots_against ⇒ Object
26
27
28
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 26
def shots_against
@shots_against ||= @raw_data[:row][:shots_against].to_i
end
|
#shutout? ⇒ Boolean
50
51
52
|
# File 'lib/ahl_scraper/resources/goalie_game_list_item.rb', line 50
def shutout?
@shutout ||= @raw_data[:row][:shutout] == "1"
end
|