Class: SportsDataApi::Mlb::Game

Inherits:
JsonData
  • Object
show all
Defined in:
lib/sports_data_api/mlb/game.rb

Instance Method Summary collapse

Methods inherited from JsonData

#[], #initialize

Constructor Details

This class inherits a constructor from SportsDataApi::JsonData

Instance Method Details

#awayObject



8
9
10
# File 'lib/sports_data_api/mlb/game.rb', line 8

def away
  @away ||= Team.new(game[:away])
end

#away_team_idObject



16
17
18
# File 'lib/sports_data_api/mlb/game.rb', line 16

def away_team_id
  @away_team_id ||= away[:id]
end

#homeObject



4
5
6
# File 'lib/sports_data_api/mlb/game.rb', line 4

def home
  @home ||= Team.new(game[:home])
end

#home_team_idObject



12
13
14
# File 'lib/sports_data_api/mlb/game.rb', line 12

def home_team_id
  @home_team_id ||= home[:id]
end