Class: AhlScraper::PlayoffBrackets::Game

Inherits:
Resource
  • Object
show all
Defined in:
lib/ahl_scraper/resources/playoff_brackets/game.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

#away_scoreObject



22
23
24
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 22

def away_score
  @away_score ||= @raw_data[:visiting_goal_count].to_i
end

#away_teamObject



18
19
20
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 18

def away_team
  @away_team ||= @raw_data[:visiting_team].to_i
end

#dateObject



30
31
32
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 30

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

#home_scoreObject



14
15
16
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 14

def home_score
  @home_score ||= @raw_data[:home_goal_count].to_i
end

#home_teamObject



10
11
12
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 10

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

#idObject



6
7
8
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 6

def id
  @id ||= @raw_data[:game_id].to_i
end

#if_necessary?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 34

def if_necessary?
  @if_necessary ||= @raw_data[:if_necessary] == "1"
end

#notesObject



38
39
40
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 38

def notes
  @notes ||= @raw_data[:game_notes]
end

#statusObject



26
27
28
# File 'lib/ahl_scraper/resources/playoff_brackets/game.rb', line 26

def status
  @status ||= @raw_data[:game_status]
end