Class: NBA::ScheduledGame
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::ScheduledGame
- Defined in:
- lib/nba/scheduled_game.rb
Overview
Represents a scheduled game
Instance Attribute Summary collapse
-
#arena_city ⇒ String
Returns the arena city.
-
#arena_name ⇒ String
Returns the arena name.
-
#arena_state ⇒ String
Returns the arena state.
-
#away_team_city ⇒ String
Returns the away team city.
-
#away_team_id ⇒ Integer
Returns the away team ID.
-
#away_team_losses ⇒ Integer
Returns the away team losses.
-
#away_team_name ⇒ String
Returns the away team name.
-
#away_team_score ⇒ Integer
Returns the away team score.
-
#away_team_tricode ⇒ String
Returns the away team tricode/abbreviation.
-
#away_team_wins ⇒ Integer
Returns the away team wins.
-
#broadcasters ⇒ String
Returns the broadcaster information.
-
#game_code ⇒ String
Returns the game code.
-
#game_date ⇒ String
Returns the game date.
-
#game_id ⇒ String
Returns the game ID.
-
#game_status ⇒ Integer
Returns the game status (1=scheduled, 2=in progress, 3=final).
-
#game_status_text ⇒ String
Returns the game status text.
-
#home_team_city ⇒ String
Returns the home team city.
-
#home_team_id ⇒ Integer
Returns the home team ID.
-
#home_team_losses ⇒ Integer
Returns the home team losses.
-
#home_team_name ⇒ String
Returns the home team name.
-
#home_team_score ⇒ Integer
Returns the home team score.
-
#home_team_tricode ⇒ String
Returns the home team tricode/abbreviation.
-
#home_team_wins ⇒ Integer
Returns the home team wins.
Instance Method Summary collapse
-
#away_team ⇒ Team?
Returns the away team object.
-
#final? ⇒ Boolean
Returns whether the game is final.
-
#home_team ⇒ Team?
Returns the home team object.
-
#in_progress? ⇒ Boolean
Returns whether the game is in progress.
-
#scheduled? ⇒ Boolean
Returns whether the game is scheduled.
Instance Attribute Details
#arena_city ⇒ String
Returns the arena city
172 |
# File 'lib/nba/scheduled_game.rb', line 172 attribute :arena_city, Shale::Type::String |
#arena_name ⇒ String
Returns the arena name
164 |
# File 'lib/nba/scheduled_game.rb', line 164 attribute :arena_name, Shale::Type::String |
#arena_state ⇒ String
Returns the arena state
180 |
# File 'lib/nba/scheduled_game.rb', line 180 attribute :arena_state, Shale::Type::String |
#away_team_city ⇒ String
Returns the away team city
124 |
# File 'lib/nba/scheduled_game.rb', line 124 attribute :away_team_city, Shale::Type::String |
#away_team_id ⇒ Integer
Returns the away team ID
108 |
# File 'lib/nba/scheduled_game.rb', line 108 attribute :away_team_id, Shale::Type::Integer |
#away_team_losses ⇒ Integer
Returns the away team losses
148 |
# File 'lib/nba/scheduled_game.rb', line 148 attribute :away_team_losses, Shale::Type::Integer |
#away_team_name ⇒ String
Returns the away team name
116 |
# File 'lib/nba/scheduled_game.rb', line 116 attribute :away_team_name, Shale::Type::String |
#away_team_score ⇒ Integer
Returns the away team score
156 |
# File 'lib/nba/scheduled_game.rb', line 156 attribute :away_team_score, Shale::Type::Integer |
#away_team_tricode ⇒ String
Returns the away team tricode/abbreviation
132 |
# File 'lib/nba/scheduled_game.rb', line 132 attribute :away_team_tricode, Shale::Type::String |
#away_team_wins ⇒ Integer
Returns the away team wins
140 |
# File 'lib/nba/scheduled_game.rb', line 140 attribute :away_team_wins, Shale::Type::Integer |
#broadcasters ⇒ String
Returns the broadcaster information
188 |
# File 'lib/nba/scheduled_game.rb', line 188 attribute :broadcasters, Shale::Type::String |
#game_code ⇒ String
Returns the game code
28 |
# File 'lib/nba/scheduled_game.rb', line 28 attribute :game_code, Shale::Type::String |
#game_date ⇒ String
Returns the game date
12 |
# File 'lib/nba/scheduled_game.rb', line 12 attribute :game_date, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
20 |
# File 'lib/nba/scheduled_game.rb', line 20 attribute :game_id, Shale::Type::String |
#game_status ⇒ Integer
Returns the game status (1=scheduled, 2=in progress, 3=final)
36 |
# File 'lib/nba/scheduled_game.rb', line 36 attribute :game_status, Shale::Type::Integer |
#game_status_text ⇒ String
Returns the game status text
44 |
# File 'lib/nba/scheduled_game.rb', line 44 attribute :game_status_text, Shale::Type::String |
#home_team_city ⇒ String
Returns the home team city
68 |
# File 'lib/nba/scheduled_game.rb', line 68 attribute :home_team_city, Shale::Type::String |
#home_team_id ⇒ Integer
Returns the home team ID
52 |
# File 'lib/nba/scheduled_game.rb', line 52 attribute :home_team_id, Shale::Type::Integer |
#home_team_losses ⇒ Integer
Returns the home team losses
92 |
# File 'lib/nba/scheduled_game.rb', line 92 attribute :home_team_losses, Shale::Type::Integer |
#home_team_name ⇒ String
Returns the home team name
60 |
# File 'lib/nba/scheduled_game.rb', line 60 attribute :home_team_name, Shale::Type::String |
#home_team_score ⇒ Integer
Returns the home team score
100 |
# File 'lib/nba/scheduled_game.rb', line 100 attribute :home_team_score, Shale::Type::Integer |
#home_team_tricode ⇒ String
Returns the home team tricode/abbreviation
76 |
# File 'lib/nba/scheduled_game.rb', line 76 attribute :home_team_tricode, Shale::Type::String |
#home_team_wins ⇒ Integer
Returns the home team wins
84 |
# File 'lib/nba/scheduled_game.rb', line 84 attribute :home_team_wins, Shale::Type::Integer |
Instance Method Details
#away_team ⇒ Team?
Returns the away team object
206 207 208 |
# File 'lib/nba/scheduled_game.rb', line 206 def away_team Teams.find(away_team_id) end |
#final? ⇒ Boolean
Returns whether the game is final
236 237 238 |
# File 'lib/nba/scheduled_game.rb', line 236 def final? game_status.eql?(3) end |
#home_team ⇒ Team?
Returns the home team object
196 197 198 |
# File 'lib/nba/scheduled_game.rb', line 196 def home_team Teams.find(home_team_id) end |
#in_progress? ⇒ Boolean
Returns whether the game is in progress
226 227 228 |
# File 'lib/nba/scheduled_game.rb', line 226 def in_progress? game_status.eql?(2) end |
#scheduled? ⇒ Boolean
Returns whether the game is scheduled
216 217 218 |
# File 'lib/nba/scheduled_game.rb', line 216 def scheduled? game_status.eql?(1) end |