Class: AhlScraper::Scoreboard
Instance Method Summary
collapse
Methods inherited from Resource
#[], #each, #inspect, #keys, #to_json, #values
Constructor Details
#initialize(raw_data) ⇒ Scoreboard
Returns a new instance of Scoreboard.
5
6
7
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 5
def initialize(raw_data)
super(raw_data, {})
end
|
Instance Method Details
#away_score ⇒ Object
97
98
99
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 97
def away_score
@away_score ||= @raw_data[:VisitorGoals].to_i
end
|
#away_team ⇒ Object
101
102
103
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 101
def away_team
@away_team ||= Scoreboards::Team.new(away_team_data)
end
|
#game_clock ⇒ Object
61
62
63
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 61
def game_clock
@game_clock ||= @raw_data[:GameClock]
end
|
#game_date ⇒ Object
21
22
23
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 21
def game_date
@game_date ||= @raw_data[:Date]
end
|
#game_date_ISO8601 ⇒ Object
33
34
35
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 33
def game_date_ISO8601
@game_date_ISO8601 ||= @raw_data[:GameDateISO8601]
end
|
#game_date_words ⇒ Object
29
30
31
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 29
def game_date_words
@game_date_words ||= @raw_data[:GameDate]
end
|
#game_number ⇒ Object
17
18
19
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 17
def game_number
@game_number ||= @raw_data[:game_number].to_i
end
|
#game_status ⇒ Object
69
70
71
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 69
def game_status
@game_status ||= @raw_data[:GameStatusString]
end
|
#game_status_string_long ⇒ Object
73
74
75
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 73
def game_status_string_long
@game_status_string_long ||= @raw_data[:GameStatusStringLong]
end
|
#home_score ⇒ Object
89
90
91
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 89
def home_score
@home_score ||= @raw_data[:HomeGoals].to_i
end
|
#home_team ⇒ Object
93
94
95
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 93
def home_team
@home_team ||= Scoreboards::Team.new(home_team_data)
end
|
#htv_game_id ⇒ Object
25
26
27
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 25
def htv_game_id
@htv_game_id ||= @raw_data[:HtvGameID].to_i
end
|
#id ⇒ Object
9
10
11
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 9
def id
@id ||= @raw_data[:ID].to_i
end
|
#intermission? ⇒ Boolean
65
66
67
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 65
def intermission?
@intermission ||= @raw_data[:Intermission] == "1"
end
|
#period ⇒ Object
53
54
55
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 53
def period
@period ||= @raw_data[:Period].to_i
end
|
#period_long_name ⇒ Object
57
58
59
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 57
def period_long_name
@period_long_name ||= @raw_data[:PeriodNameLong]
end
|
#scheduled_time ⇒ Object
37
38
39
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 37
def scheduled_time
@scheduled_time ||= @raw_data[:ScheduledTime]
end
|
41
42
43
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 41
def scheduled_time_formatted
@scheduled_time_formatted ||= @raw_data[:ScheduledFormattedTime]
end
|
#season_id ⇒ Object
13
14
15
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 13
def season_id
@season_id ||= @raw_data[:SeasonID].to_i
end
|
#ticket_url ⇒ Object
49
50
51
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 49
def ticket_url
@ticket_url ||= @raw_data[:TicketUrl]
end
|
#timezone ⇒ Object
45
46
47
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 45
def timezone
@timezone ||= @raw_data[:Timezone]
end
|
#timezone_short ⇒ Object
85
86
87
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 85
def timezone_short
@timezone_short ||= @raw_data[:TimezoneShort]
end
|
#venue_location ⇒ Object
81
82
83
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 81
def venue_location
@venue_location ||= @raw_data[:venue_location]
end
|
#venue_name ⇒ Object
77
78
79
|
# File 'lib/ahl_scraper/resources/scoreboard.rb', line 77
def venue_name
@venue_name ||= @raw_data[:venue_name]
end
|