Class: NBA::FoundGame
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::FoundGame
- Defined in:
- lib/nba/found_game.rb
Overview
Represents a found game from the league game finder
Instance Attribute Summary collapse
-
#ast ⇒ Integer
Returns assists.
-
#blk ⇒ Integer
Returns blocks.
-
#dreb ⇒ Integer
Returns defensive rebounds.
-
#fg3_pct ⇒ Float
Returns three-point percentage.
-
#fg3a ⇒ Integer
Returns three-pointers attempted.
-
#fg3m ⇒ Integer
Returns three-pointers made.
-
#fg_pct ⇒ Float
Returns field goal percentage.
-
#fga ⇒ Integer
Returns field goals attempted.
-
#fgm ⇒ Integer
Returns field goals made.
-
#ft_pct ⇒ Float
Returns free throw percentage.
-
#fta ⇒ Integer
Returns free throws attempted.
-
#ftm ⇒ Integer
Returns free throws made.
-
#game_date ⇒ String
Returns the game date.
-
#game_id ⇒ String
Returns the game ID.
-
#matchup ⇒ String
Returns the matchup string.
-
#min ⇒ Integer
Returns minutes played.
-
#oreb ⇒ Integer
Returns offensive rebounds.
-
#pf ⇒ Integer
Returns personal fouls.
-
#plus_minus ⇒ Integer
Returns plus/minus.
-
#pts ⇒ Integer
Returns points scored.
-
#reb ⇒ Integer
Returns total rebounds.
-
#season_id ⇒ String
Returns the season ID.
-
#stl ⇒ Integer
Returns 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 turnovers.
-
#wl ⇒ String
Returns win/loss result.
Instance Method Summary collapse
-
#loss? ⇒ Boolean
Returns whether the game was a loss.
-
#team ⇒ Team?
Returns the team object.
-
#win? ⇒ Boolean
Returns whether the game was a win.
Instance Attribute Details
#ast ⇒ Integer
Returns assists
188 |
# File 'lib/nba/found_game.rb', line 188 attribute :ast, Shale::Type::Integer |
#blk ⇒ Integer
Returns blocks
204 |
# File 'lib/nba/found_game.rb', line 204 attribute :blk, Shale::Type::Integer |
#dreb ⇒ Integer
Returns defensive rebounds
172 |
# File 'lib/nba/found_game.rb', line 172 attribute :dreb, Shale::Type::Integer |
#fg3_pct ⇒ Float
Returns three-point percentage
132 |
# File 'lib/nba/found_game.rb', line 132 attribute :fg3_pct, Shale::Type::Float |
#fg3a ⇒ Integer
Returns three-pointers attempted
124 |
# File 'lib/nba/found_game.rb', line 124 attribute :fg3a, Shale::Type::Integer |
#fg3m ⇒ Integer
Returns three-pointers made
116 |
# File 'lib/nba/found_game.rb', line 116 attribute :fg3m, Shale::Type::Integer |
#fg_pct ⇒ Float
Returns field goal percentage
108 |
# File 'lib/nba/found_game.rb', line 108 attribute :fg_pct, Shale::Type::Float |
#fga ⇒ Integer
Returns field goals attempted
100 |
# File 'lib/nba/found_game.rb', line 100 attribute :fga, Shale::Type::Integer |
#fgm ⇒ Integer
Returns field goals made
92 |
# File 'lib/nba/found_game.rb', line 92 attribute :fgm, Shale::Type::Integer |
#ft_pct ⇒ Float
Returns free throw percentage
156 |
# File 'lib/nba/found_game.rb', line 156 attribute :ft_pct, Shale::Type::Float |
#fta ⇒ Integer
Returns free throws attempted
148 |
# File 'lib/nba/found_game.rb', line 148 attribute :fta, Shale::Type::Integer |
#ftm ⇒ Integer
Returns free throws made
140 |
# File 'lib/nba/found_game.rb', line 140 attribute :ftm, Shale::Type::Integer |
#game_date ⇒ String
Returns the game date
52 |
# File 'lib/nba/found_game.rb', line 52 attribute :game_date, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
44 |
# File 'lib/nba/found_game.rb', line 44 attribute :game_id, Shale::Type::String |
#matchup ⇒ String
Returns the matchup string
60 |
# File 'lib/nba/found_game.rb', line 60 attribute :matchup, Shale::Type::String |
#min ⇒ Integer
Returns minutes played
76 |
# File 'lib/nba/found_game.rb', line 76 attribute :min, Shale::Type::Integer |
#oreb ⇒ Integer
Returns offensive rebounds
164 |
# File 'lib/nba/found_game.rb', line 164 attribute :oreb, Shale::Type::Integer |
#pf ⇒ Integer
Returns personal fouls
220 |
# File 'lib/nba/found_game.rb', line 220 attribute :pf, Shale::Type::Integer |
#plus_minus ⇒ Integer
Returns plus/minus
228 |
# File 'lib/nba/found_game.rb', line 228 attribute :plus_minus, Shale::Type::Integer |
#pts ⇒ Integer
Returns points scored
84 |
# File 'lib/nba/found_game.rb', line 84 attribute :pts, Shale::Type::Integer |
#reb ⇒ Integer
Returns total rebounds
180 |
# File 'lib/nba/found_game.rb', line 180 attribute :reb, Shale::Type::Integer |
#season_id ⇒ String
Returns the season ID
12 |
# File 'lib/nba/found_game.rb', line 12 attribute :season_id, Shale::Type::String |
#stl ⇒ Integer
Returns steals
196 |
# File 'lib/nba/found_game.rb', line 196 attribute :stl, Shale::Type::Integer |
#team_abbreviation ⇒ String
Returns the team abbreviation
28 |
# File 'lib/nba/found_game.rb', line 28 attribute :team_abbreviation, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
20 |
# File 'lib/nba/found_game.rb', line 20 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the team name
36 |
# File 'lib/nba/found_game.rb', line 36 attribute :team_name, Shale::Type::String |
#tov ⇒ Integer
Returns turnovers
212 |
# File 'lib/nba/found_game.rb', line 212 attribute :tov, Shale::Type::Integer |
#wl ⇒ String
Returns win/loss result
68 |
# File 'lib/nba/found_game.rb', line 68 attribute :wl, Shale::Type::String |
Instance Method Details
#loss? ⇒ Boolean
Returns whether the game was a loss
256 257 258 |
# File 'lib/nba/found_game.rb', line 256 def loss? wl.eql?("L") end |
#team ⇒ Team?
Returns the team object
236 237 238 |
# File 'lib/nba/found_game.rb', line 236 def team Teams.find(team_id) end |
#win? ⇒ Boolean
Returns whether the game was a win
246 247 248 |
# File 'lib/nba/found_game.rb', line 246 def win? wl.eql?("W") end |