Class: NBA::InfographicFanDuelPlayerStat

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/infographic_fan_duel_player_stat.rb

Overview

Represents FanDuel infographic statistics for a player in a game

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astInteger

Returns the assists

Examples:

stat.ast #=> 8


215
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 215

attribute :ast, Shale::Type::Integer

#blkInteger

Returns the blocks

Examples:

stat.blk #=> 0


239
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 239

attribute :blk, Shale::Type::Integer

#blkaInteger

Returns the blocked attempts

Examples:

stat.blka #=> 1


247
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 247

attribute :blka, Shale::Type::Integer

#drebInteger

Returns the defensive rebounds

Examples:

stat.dreb #=> 5


199
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 199

attribute :dreb, Shale::Type::Integer

#fan_duel_ptsFloat

Returns the FanDuel fantasy points

Examples:

stat.fan_duel_pts #=> 52.3


87
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 87

attribute :fan_duel_pts, Shale::Type::Float

#fg3_pctFloat

Returns the three-point percentage

Examples:

stat.fg3_pct #=> 0.455


159
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 159

attribute :fg3_pct, Shale::Type::Float

#fg3aInteger

Returns the three-pointers attempted

Examples:

stat.fg3a #=> 11


151
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 151

attribute :fg3a, Shale::Type::Integer

#fg3mInteger

Returns the three-pointers made

Examples:

stat.fg3m #=> 5


143
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 143

attribute :fg3m, Shale::Type::Integer

#fg_pctFloat

Returns the field goal percentage

Examples:

stat.fg_pct #=> 0.500


135
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 135

attribute :fg_pct, Shale::Type::Float

#fgaInteger

Returns the field goals attempted

Examples:

stat.fga #=> 20


127
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 127

attribute :fga, Shale::Type::Integer

#fgmInteger

Returns the field goals made

Examples:

stat.fgm #=> 10


119
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 119

attribute :fgm, Shale::Type::Integer

#ft_pctFloat

Returns the free throw percentage

Examples:

stat.ft_pct #=> 0.833


183
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 183

attribute :ft_pct, Shale::Type::Float

#ftaInteger

Returns the free throws attempted

Examples:

stat.fta #=> 6


175
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 175

attribute :fta, Shale::Type::Integer

#ftmInteger

Returns the free throws made

Examples:

stat.ftm #=> 5


167
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 167

attribute :ftm, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

stat.game_id #=> "0022400001"


15
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 15

attribute :game_id, Shale::Type::String

#jersey_numString

Returns the jersey number

Examples:

stat.jersey_num #=> "30"


63
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 63

attribute :jersey_num, Shale::Type::String

#locationString

Returns the location (home/away)

Examples:

stat.location #=> "Home"


79
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 79

attribute :location, Shale::Type::String

#minFloat

Returns the minutes played

Examples:

stat.min #=> 34.5


111
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 111

attribute :min, Shale::Type::Float

#nba_fantasy_ptsFloat

Returns the NBA fantasy points

Examples:

stat.nba_fantasy_pts #=> 48.5


95
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 95

attribute :nba_fantasy_pts, Shale::Type::Float

#orebInteger

Returns the offensive rebounds

Examples:

stat.oreb #=> 1


191
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 191

attribute :oreb, Shale::Type::Integer

#pfInteger

Returns the personal fouls

Examples:

stat.pf #=> 2


255
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 255

attribute :pf, Shale::Type::Integer

#pfdInteger

Returns the personal fouls drawn

Examples:

stat.pfd #=> 4


263
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 263

attribute :pfd, Shale::Type::Integer

#player_idInteger

Returns the player ID

Examples:

stat.player_id #=> 201939


23
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 23

attribute :player_id, Shale::Type::Integer

#player_nameString

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"


31
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 31

attribute :player_name, Shale::Type::String

#player_positionString

Returns the player position

Examples:

stat.player_position #=> "G"


71
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 71

attribute :player_position, Shale::Type::String

#plus_minusInteger

Returns the plus/minus

Examples:

stat.plus_minus #=> 15


279
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 279

attribute :plus_minus, Shale::Type::Integer

#ptsInteger

Returns the points scored

Examples:

stat.pts #=> 30


271
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 271

attribute :pts, Shale::Type::Integer

#rebInteger

Returns the total rebounds

Examples:

stat.reb #=> 6


207
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 207

attribute :reb, Shale::Type::Integer

#stlInteger

Returns the steals

Examples:

stat.stl #=> 2


231
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 231

attribute :stl, Shale::Type::Integer

#team_abbreviationString

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"


55
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 55

attribute :team_abbreviation, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744


39
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 39

attribute :team_id, Shale::Type::Integer

#team_nameString

Returns the team name

Examples:

stat.team_name #=> "Warriors"


47
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 47

attribute :team_name, Shale::Type::String

#tovInteger

Returns the turnovers

Examples:

stat.tov #=> 3


223
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 223

attribute :tov, Shale::Type::Integer

#usg_pctFloat

Returns the usage percentage

Examples:

stat.usg_pct #=> 0.312


103
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 103

attribute :usg_pct, Shale::Type::Float

Instance Method Details

#gameGame?

Returns the game object

Examples:

stat.game #=> #<NBA::Game>


307
308
309
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 307

def game
  Games.find(game_id)
end

#playerPlayer?

Returns the player object

Examples:

stat.player #=> #<NBA::Player>


287
288
289
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 287

def player
  Players.find(player_id)
end

#teamTeam?

Returns the team object

Examples:

stat.team #=> #<NBA::Team>


297
298
299
# File 'lib/nba/infographic_fan_duel_player_stat.rb', line 297

def team
  Teams.find(team_id)
end