Class: AhlScraper::Games::Info

Inherits:
Resource
  • Object
show all
Defined in:
lib/ahl_scraper/resources/games/info.rb

Instance Method Summary collapse

Methods inherited from Resource

#[], #each, #initialize, #inspect, #keys, #to_json, #values

Constructor Details

This class inherits a constructor from AhlScraper::Resource

Instance Method Details

#attendanceObject



26
27
28
# File 'lib/ahl_scraper/resources/games/info.rb', line 26

def attendance
  @attendance ||= @raw_data[:attendance].to_i
end

#dateObject



14
15
16
# File 'lib/ahl_scraper/resources/games/info.rb', line 14

def date
  @date ||= @raw_data[:date]
end

#datetimeObject



78
79
80
# File 'lib/ahl_scraper/resources/games/info.rb', line 78

def datetime
  @datetime ||= @raw_data[:GameDateISO8601]
end

#durationObject



38
39
40
# File 'lib/ahl_scraper/resources/games/info.rb', line 38

def duration
  @duration ||= @raw_data[:duration]
end

#end_timeObject



34
35
36
# File 'lib/ahl_scraper/resources/games/info.rb', line 34

def end_time
  @end_time ||= @raw_data[:endTime]
end

#finalObject



58
59
60
# File 'lib/ahl_scraper/resources/games/info.rb', line 58

def final
  @final ||= @raw_data[:final] == "1"
end

#game_numberObject



18
19
20
# File 'lib/ahl_scraper/resources/games/info.rb', line 18

def game_number
  @game_number ||= @raw_data[:gameNumber].to_i
end

#game_report_urlObject



42
43
44
# File 'lib/ahl_scraper/resources/games/info.rb', line 42

def game_report_url
  @game_report_url ||= @raw_data[:gameReportUrl]
end

#htv_game_idObject



74
75
76
# File 'lib/ahl_scraper/resources/games/info.rb', line 74

def htv_game_id
  @htv_game_id ||= @raw_data[:htvGameId]
end

#idObject



6
7
8
# File 'lib/ahl_scraper/resources/games/info.rb', line 6

def id
  @id ||= @raw_data[:id]
end

#nameObject



10
11
12
# File 'lib/ahl_scraper/resources/games/info.rb', line 10

def name
  @name ||= @opts[:name]
end

#public_notesObject



62
63
64
# File 'lib/ahl_scraper/resources/games/info.rb', line 62

def public_notes
  @public_notes ||= @raw_data[:publicNotes]
end

#season_idObject



70
71
72
# File 'lib/ahl_scraper/resources/games/info.rb', line 70

def season_id
  @season_id ||= @raw_data[:seasonId].to_i
end

#start_timeObject



30
31
32
# File 'lib/ahl_scraper/resources/games/info.rb', line 30

def start_time
  @start_time ||= @raw_data[:startTime]
end

#startedObject



54
55
56
# File 'lib/ahl_scraper/resources/games/info.rb', line 54

def started
  @started ||= @raw_data[:started] == "1"
end

#statusObject



66
67
68
# File 'lib/ahl_scraper/resources/games/info.rb', line 66

def status
  @status ||= @raw_data[:started] == "0" ? @raw_data[:status].strip : @raw_data[:status]
end

#text_boxscore_urlObject



46
47
48
# File 'lib/ahl_scraper/resources/games/info.rb', line 46

def text_boxscore_url
  @text_boxscore_url ||= @raw_data[:textBoxscoreUrl]
end

#tickets_urlObject



50
51
52
# File 'lib/ahl_scraper/resources/games/info.rb', line 50

def tickets_url
  @tickets_url ||= @raw_data[:ticketsUrl]
end

#venueObject



22
23
24
# File 'lib/ahl_scraper/resources/games/info.rb', line 22

def venue
  @venue ||= @raw_data[:venue]
end