Class: NBA::BoxScoreSummary
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::BoxScoreSummary
- Defined in:
- lib/nba/box_score_summary.rb
Overview
Represents game summary information
Instance Attribute Summary collapse
-
#arena ⇒ String
Returns the arena name.
-
#attendance ⇒ Integer
Returns the attendance.
-
#game_date ⇒ String
Returns the game date.
-
#game_id ⇒ String
Returns the game ID.
-
#game_status_id ⇒ Integer
Returns the game status ID.
-
#game_status_text ⇒ String
Returns the game status text.
-
#game_time ⇒ String
Returns the game duration.
-
#home_pts ⇒ Integer
Returns home team total points.
-
#home_pts_ot ⇒ Integer
Returns home team OT points.
-
#home_pts_q1 ⇒ Integer
Returns home team Q1 points.
-
#home_pts_q2 ⇒ Integer
Returns home team Q2 points.
-
#home_pts_q3 ⇒ Integer
Returns home team Q3 points.
-
#home_pts_q4 ⇒ Integer
Returns home team Q4 points.
-
#home_team_id ⇒ Integer
Returns the home team ID.
-
#lead_changes ⇒ Integer
Returns the number of lead changes.
-
#live_pc_time ⇒ String
Returns the time on the clock if live.
-
#live_period ⇒ Integer
Returns the current period if live.
-
#officials ⇒ Array<String>
Returns the game officials.
-
#season ⇒ String
Returns the season.
-
#times_tied ⇒ Integer
Returns the number of times tied.
-
#visitor_pts ⇒ Integer
Returns visitor team total points.
-
#visitor_pts_ot ⇒ Integer
Returns visitor team OT points.
-
#visitor_pts_q1 ⇒ Integer
Returns visitor team Q1 points.
-
#visitor_pts_q2 ⇒ Integer
Returns visitor team Q2 points.
-
#visitor_pts_q3 ⇒ Integer
Returns visitor team Q3 points.
-
#visitor_pts_q4 ⇒ Integer
Returns visitor team Q4 points.
-
#visitor_team_id ⇒ Integer
Returns the visitor team ID.
Instance Method Summary collapse
-
#final? ⇒ Boolean
Returns whether the game is final.
-
#game ⇒ Game?
Returns the game object.
-
#home_team ⇒ Team?
Returns the home team object.
-
#in_progress? ⇒ Boolean
Returns whether the game is in progress.
-
#scheduled? ⇒ Boolean
Returns whether the game has not started.
-
#visitor_team ⇒ Team?
Returns the visitor team object.
Instance Attribute Details
#arena ⇒ String
Returns the arena name
103 |
# File 'lib/nba/box_score_summary.rb', line 103 attribute :arena, Shale::Type::String |
#attendance ⇒ Integer
Returns the attendance
87 |
# File 'lib/nba/box_score_summary.rb', line 87 attribute :attendance, Shale::Type::Integer |
#game_date ⇒ String
Returns the game date
23 |
# File 'lib/nba/box_score_summary.rb', line 23 attribute :game_date, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
15 |
# File 'lib/nba/box_score_summary.rb', line 15 attribute :game_id, Shale::Type::String |
#game_status_id ⇒ Integer
Returns the game status ID
31 |
# File 'lib/nba/box_score_summary.rb', line 31 attribute :game_status_id, Shale::Type::Integer |
#game_status_text ⇒ String
Returns the game status text
39 |
# File 'lib/nba/box_score_summary.rb', line 39 attribute :game_status_text, Shale::Type::String |
#game_time ⇒ String
Returns the game duration
95 |
# File 'lib/nba/box_score_summary.rb', line 95 attribute :game_time, Shale::Type::String |
#home_pts ⇒ Integer
Returns home team total points
175 |
# File 'lib/nba/box_score_summary.rb', line 175 attribute :home_pts, Shale::Type::Integer |
#home_pts_ot ⇒ Integer
Returns home team OT points
167 |
# File 'lib/nba/box_score_summary.rb', line 167 attribute :home_pts_ot, Shale::Type::Integer |
#home_pts_q1 ⇒ Integer
Returns home team Q1 points
135 |
# File 'lib/nba/box_score_summary.rb', line 135 attribute :home_pts_q1, Shale::Type::Integer |
#home_pts_q2 ⇒ Integer
Returns home team Q2 points
143 |
# File 'lib/nba/box_score_summary.rb', line 143 attribute :home_pts_q2, Shale::Type::Integer |
#home_pts_q3 ⇒ Integer
Returns home team Q3 points
151 |
# File 'lib/nba/box_score_summary.rb', line 151 attribute :home_pts_q3, Shale::Type::Integer |
#home_pts_q4 ⇒ Integer
Returns home team Q4 points
159 |
# File 'lib/nba/box_score_summary.rb', line 159 attribute :home_pts_q4, Shale::Type::Integer |
#home_team_id ⇒ Integer
Returns the home team ID
47 |
# File 'lib/nba/box_score_summary.rb', line 47 attribute :home_team_id, Shale::Type::Integer |
#lead_changes ⇒ Integer
Returns the number of lead changes
111 |
# File 'lib/nba/box_score_summary.rb', line 111 attribute :lead_changes, Shale::Type::Integer |
#live_pc_time ⇒ String
Returns the time on the clock if live
79 |
# File 'lib/nba/box_score_summary.rb', line 79 attribute :live_pc_time, Shale::Type::String |
#live_period ⇒ Integer
Returns the current period if live
71 |
# File 'lib/nba/box_score_summary.rb', line 71 attribute :live_period, Shale::Type::Integer |
#officials ⇒ Array<String>
Returns the game officials
127 |
# File 'lib/nba/box_score_summary.rb', line 127 attribute :officials, Shale::Type::String, collection: true |
#season ⇒ String
Returns the season
63 |
# File 'lib/nba/box_score_summary.rb', line 63 attribute :season, Shale::Type::String |
#times_tied ⇒ Integer
Returns the number of times tied
119 |
# File 'lib/nba/box_score_summary.rb', line 119 attribute :times_tied, Shale::Type::Integer |
#visitor_pts ⇒ Integer
Returns visitor team total points
223 |
# File 'lib/nba/box_score_summary.rb', line 223 attribute :visitor_pts, Shale::Type::Integer |
#visitor_pts_ot ⇒ Integer
Returns visitor team OT points
215 |
# File 'lib/nba/box_score_summary.rb', line 215 attribute :visitor_pts_ot, Shale::Type::Integer |
#visitor_pts_q1 ⇒ Integer
Returns visitor team Q1 points
183 |
# File 'lib/nba/box_score_summary.rb', line 183 attribute :visitor_pts_q1, Shale::Type::Integer |
#visitor_pts_q2 ⇒ Integer
Returns visitor team Q2 points
191 |
# File 'lib/nba/box_score_summary.rb', line 191 attribute :visitor_pts_q2, Shale::Type::Integer |
#visitor_pts_q3 ⇒ Integer
Returns visitor team Q3 points
199 |
# File 'lib/nba/box_score_summary.rb', line 199 attribute :visitor_pts_q3, Shale::Type::Integer |
#visitor_pts_q4 ⇒ Integer
Returns visitor team Q4 points
207 |
# File 'lib/nba/box_score_summary.rb', line 207 attribute :visitor_pts_q4, Shale::Type::Integer |
#visitor_team_id ⇒ Integer
Returns the visitor team ID
55 |
# File 'lib/nba/box_score_summary.rb', line 55 attribute :visitor_team_id, Shale::Type::Integer |
Instance Method Details
#final? ⇒ Boolean
Returns whether the game is final
261 262 263 |
# File 'lib/nba/box_score_summary.rb', line 261 def final? game_status_id.eql?(3) end |
#game ⇒ Game?
Returns the game object
251 252 253 |
# File 'lib/nba/box_score_summary.rb', line 251 def game Games.find(game_id) end |
#home_team ⇒ Team?
Returns the home team object
231 232 233 |
# File 'lib/nba/box_score_summary.rb', line 231 def home_team Teams.find(home_team_id) end |
#in_progress? ⇒ Boolean
Returns whether the game is in progress
271 272 273 |
# File 'lib/nba/box_score_summary.rb', line 271 def in_progress? game_status_id.eql?(2) end |
#scheduled? ⇒ Boolean
Returns whether the game has not started
281 282 283 |
# File 'lib/nba/box_score_summary.rb', line 281 def scheduled? game_status_id.eql?(1) end |
#visitor_team ⇒ Team?
Returns the visitor team object
241 242 243 |
# File 'lib/nba/box_score_summary.rb', line 241 def visitor_team Teams.find(visitor_team_id) end |