Class: NBA::GameLog
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::GameLog
- Defined in:
- lib/nba/game_log.rb
Overview
Represents a single game log entry for a player or team
Instance Attribute Summary collapse
-
#ast ⇒ Integer
Returns the assists.
-
#blk ⇒ Integer
Returns the blocks.
-
#dreb ⇒ Integer
Returns the defensive rebounds.
-
#fg3_pct ⇒ Float
Returns the three-point percentage.
-
#fg3a ⇒ Integer
Returns the three-pointers attempted.
-
#fg3m ⇒ Integer
Returns the three-pointers made.
-
#fg_pct ⇒ Float
Returns the field goal percentage.
-
#fga ⇒ Integer
Returns the field goals attempted.
-
#fgm ⇒ Integer
Returns the field goals made.
-
#ft_pct ⇒ Float
Returns the free throw percentage.
-
#fta ⇒ Integer
Returns the free throws attempted.
-
#ftm ⇒ Integer
Returns the free throws made.
-
#game_date ⇒ String
Returns the game date.
-
#game_id ⇒ String
Returns the game ID.
-
#matchup ⇒ String
Returns the matchup description.
-
#min ⇒ Integer
Returns the minutes played.
-
#oreb ⇒ Integer
Returns the offensive rebounds.
-
#pf ⇒ Integer
Returns the personal fouls.
-
#player_id ⇒ Integer
Returns the player ID.
-
#player_name ⇒ String
Returns the player name.
-
#plus_minus ⇒ Integer
Returns the plus/minus.
-
#pts ⇒ Integer
Returns the points scored.
-
#reb ⇒ Integer
Returns the total rebounds.
-
#season_id ⇒ String
Returns the season ID.
-
#stl ⇒ Integer
Returns the steals.
-
#team_abbreviation ⇒ String
Returns the team abbreviation.
-
#team_id ⇒ Integer
Returns the team ID.
-
#team_name ⇒ String
Returns the team name.
-
#tov ⇒ Integer
Returns the turnovers.
-
#wl ⇒ String
Returns the win/loss indicator.
Instance Method Summary collapse
-
#game ⇒ Game?
Returns the game object for this log entry.
-
#loss? ⇒ Boolean
Returns whether the game was a loss.
-
#player ⇒ Player?
Returns the player object for this log entry.
-
#win? ⇒ Boolean
Returns whether the game was a win.
Instance Attribute Details
#ast ⇒ Integer
Returns the assists
201 |
# File 'lib/nba/game_log.rb', line 201 attribute :ast, Shale::Type::Integer |
#blk ⇒ Integer
Returns the blocks
217 |
# File 'lib/nba/game_log.rb', line 217 attribute :blk, Shale::Type::Integer |
#dreb ⇒ Integer
Returns the defensive rebounds
185 |
# File 'lib/nba/game_log.rb', line 185 attribute :dreb, Shale::Type::Integer |
#fg3_pct ⇒ Float
Returns the three-point percentage
145 |
# File 'lib/nba/game_log.rb', line 145 attribute :fg3_pct, Shale::Type::Float |
#fg3a ⇒ Integer
Returns the three-pointers attempted
137 |
# File 'lib/nba/game_log.rb', line 137 attribute :fg3a, Shale::Type::Integer |
#fg3m ⇒ Integer
Returns the three-pointers made
129 |
# File 'lib/nba/game_log.rb', line 129 attribute :fg3m, Shale::Type::Integer |
#fg_pct ⇒ Float
Returns the field goal percentage
121 |
# File 'lib/nba/game_log.rb', line 121 attribute :fg_pct, Shale::Type::Float |
#fga ⇒ Integer
Returns the field goals attempted
113 |
# File 'lib/nba/game_log.rb', line 113 attribute :fga, Shale::Type::Integer |
#fgm ⇒ Integer
Returns the field goals made
105 |
# File 'lib/nba/game_log.rb', line 105 attribute :fgm, Shale::Type::Integer |
#ft_pct ⇒ Float
Returns the free throw percentage
169 |
# File 'lib/nba/game_log.rb', line 169 attribute :ft_pct, Shale::Type::Float |
#fta ⇒ Integer
Returns the free throws attempted
161 |
# File 'lib/nba/game_log.rb', line 161 attribute :fta, Shale::Type::Integer |
#ftm ⇒ Integer
Returns the free throws made
153 |
# File 'lib/nba/game_log.rb', line 153 attribute :ftm, Shale::Type::Integer |
#game_date ⇒ String
Returns the game date
73 |
# File 'lib/nba/game_log.rb', line 73 attribute :game_date, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
65 |
# File 'lib/nba/game_log.rb', line 65 attribute :game_id, Shale::Type::String |
#matchup ⇒ String
Returns the matchup description
81 |
# File 'lib/nba/game_log.rb', line 81 attribute :matchup, Shale::Type::String |
#min ⇒ Integer
Returns the minutes played
97 |
# File 'lib/nba/game_log.rb', line 97 attribute :min, Shale::Type::Integer |
#oreb ⇒ Integer
Returns the offensive rebounds
177 |
# File 'lib/nba/game_log.rb', line 177 attribute :oreb, Shale::Type::Integer |
#pf ⇒ Integer
Returns the personal fouls
233 |
# File 'lib/nba/game_log.rb', line 233 attribute :pf, Shale::Type::Integer |
#player_id ⇒ Integer
Returns the player ID
25 |
# File 'lib/nba/game_log.rb', line 25 attribute :player_id, Shale::Type::Integer |
#player_name ⇒ String
Returns the player name
33 |
# File 'lib/nba/game_log.rb', line 33 attribute :player_name, Shale::Type::String |
#plus_minus ⇒ Integer
Returns the plus/minus
249 |
# File 'lib/nba/game_log.rb', line 249 attribute :plus_minus, Shale::Type::Integer |
#pts ⇒ Integer
Returns the points scored
241 |
# File 'lib/nba/game_log.rb', line 241 attribute :pts, Shale::Type::Integer |
#reb ⇒ Integer
Returns the total rebounds
193 |
# File 'lib/nba/game_log.rb', line 193 attribute :reb, Shale::Type::Integer |
#season_id ⇒ String
Returns the season ID
17 |
# File 'lib/nba/game_log.rb', line 17 attribute :season_id, Shale::Type::String |
#stl ⇒ Integer
Returns the steals
209 |
# File 'lib/nba/game_log.rb', line 209 attribute :stl, Shale::Type::Integer |
#team_abbreviation ⇒ String
Returns the team abbreviation
49 |
# File 'lib/nba/game_log.rb', line 49 attribute :team_abbreviation, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
41 |
# File 'lib/nba/game_log.rb', line 41 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the team name
57 |
# File 'lib/nba/game_log.rb', line 57 attribute :team_name, Shale::Type::String |
#tov ⇒ Integer
Returns the turnovers
225 |
# File 'lib/nba/game_log.rb', line 225 attribute :tov, Shale::Type::Integer |
#wl ⇒ String
Returns the win/loss indicator
89 |
# File 'lib/nba/game_log.rb', line 89 attribute :wl, Shale::Type::String |
Instance Method Details
#game ⇒ Game?
Returns the game object for this log entry
273 |
# File 'lib/nba/game_log.rb', line 273 def game = Games.find(game_id) |
#loss? ⇒ Boolean
Returns whether the game was a loss
265 |
# File 'lib/nba/game_log.rb', line 265 def loss? = wl.eql?("L") |
#player ⇒ Player?
Returns the player object for this log entry
281 |
# File 'lib/nba/game_log.rb', line 281 def player = Players.find(player_id) |
#win? ⇒ Boolean
Returns whether the game was a win
257 |
# File 'lib/nba/game_log.rb', line 257 def win? = wl.eql?("W") |