Class: NBA::LeagueDashPlayerClutchStat

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

Overview

Represents clutch-time player statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#age ⇒ Integer?

Returns the player age

Examples:

stat.age #=> 36

Returns:

  • (Integer, nil) —

    the player age



57
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 57

attribute :age, Shale::Type::Integer

#ast ⇒ Float?

Returns assists

Examples:

stat.ast #=> 1.0

Returns:

  • (Float, nil) —

    assists



201
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 201

attribute :ast, Shale::Type::Float

#blk ⇒ Float?

Returns blocks

Examples:

stat.blk #=> 0.1

Returns:

  • (Float, nil) —

    blocks



225
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 225

attribute :blk, Shale::Type::Float

#dreb ⇒ Float?

Returns defensive rebounds

Examples:

stat.dreb #=> 0.5

Returns:

  • (Float, nil) —

    defensive rebounds



185
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 185

attribute :dreb, Shale::Type::Float

#fg3_pct ⇒ Float?

Returns three point percentage

Examples:

stat.fg3_pct #=> 0.357

Returns:

  • (Float, nil) —

    three point percentage



145
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 145

attribute :fg3_pct, Shale::Type::Float

#fg3a ⇒ Float?

Returns three pointers attempted

Examples:

stat.fg3a #=> 1.4

Returns:

  • (Float, nil) —

    three pointers attempted



137
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 137

attribute :fg3a, Shale::Type::Float

#fg3m ⇒ Float?

Returns three pointers made

Examples:

stat.fg3m #=> 0.5

Returns:

  • (Float, nil) —

    three pointers made



129
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 129

attribute :fg3m, Shale::Type::Float

#fg_pct ⇒ Float?

Returns field goal percentage

Examples:

stat.fg_pct #=> 0.429

Returns:

  • (Float, nil) —

    field goal percentage



121
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 121

attribute :fg_pct, Shale::Type::Float

#fga ⇒ Float?

Returns field goals attempted

Examples:

stat.fga #=> 2.8

Returns:

  • (Float, nil) —

    field goals attempted



113
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 113

attribute :fga, Shale::Type::Float

#fgm ⇒ Float?

Returns field goals made

Examples:

stat.fgm #=> 1.2

Returns:

  • (Float, nil) —

    field goals made



105
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 105

attribute :fgm, Shale::Type::Float

#ft_pct ⇒ Float?

Returns free throw percentage

Examples:

stat.ft_pct #=> 0.889

Returns:

  • (Float, nil) —

    free throw percentage



169
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 169

attribute :ft_pct, Shale::Type::Float

#fta ⇒ Float?

Returns free throws attempted

Examples:

stat.fta #=> 0.9

Returns:

  • (Float, nil) —

    free throws attempted



161
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 161

attribute :fta, Shale::Type::Float

#ftm ⇒ Float?

Returns free throws made

Examples:

stat.ftm #=> 0.8

Returns:

  • (Float, nil) —

    free throws made



153
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 153

attribute :ftm, Shale::Type::Float

#gp ⇒ Integer?

Returns games played

Examples:

stat.gp #=> 74

Returns:

  • (Integer, nil) —

    games played



65
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 65

attribute :gp, Shale::Type::Integer

#l ⇒ Integer?

Returns losses

Examples:

stat.l #=> 28

Returns:

  • (Integer, nil) —

    losses



81
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 81

attribute :l, Shale::Type::Integer

#min ⇒ Float?

Returns minutes played

Examples:

stat.min #=> 5.2

Returns:

  • (Float, nil) —

    minutes played



97
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 97

attribute :min, Shale::Type::Float

#oreb ⇒ Float?

Returns offensive rebounds

Examples:

stat.oreb #=> 0.1

Returns:

  • (Float, nil) —

    offensive rebounds



177
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 177

attribute :oreb, Shale::Type::Float

#pf ⇒ Float?

Returns personal fouls

Examples:

stat.pf #=> 0.3

Returns:

  • (Float, nil) —

    personal fouls



233
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 233

attribute :pf, Shale::Type::Float

#player_id ⇒ Integer?

Returns the player ID

Examples:

stat.player_id #=> 201939

Returns:

  • (Integer, nil) —

    the player ID



17
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 17

attribute :player_id, Shale::Type::Integer

#player_name ⇒ String?

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"

Returns:

  • (String, nil) —

    the player name



25
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 25

attribute :player_name, Shale::Type::String

#plus_minus ⇒ Float?

Returns plus/minus

Examples:

stat.plus_minus #=> 1.2

Returns:

  • (Float, nil) —

    plus/minus



249
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 249

attribute :plus_minus, Shale::Type::Float

#pts ⇒ Float?

Returns points

Examples:

stat.pts #=> 3.7

Returns:

  • (Float, nil) —

    points



241
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 241

attribute :pts, Shale::Type::Float

#reb ⇒ Float?

Returns total rebounds

Examples:

stat.reb #=> 0.6

Returns:

  • (Float, nil) —

    total rebounds



193
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 193

attribute :reb, Shale::Type::Float

#season_id ⇒ String?

Returns the season ID

Examples:

stat.season_id #=> "2024-25"

Returns:

  • (String, nil) —

    the season ID



49
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 49

attribute :season_id, Shale::Type::String

#stl ⇒ Float?

Returns steals

Examples:

stat.stl #=> 0.2

Returns:

  • (Float, nil) —

    steals



217
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 217

attribute :stl, Shale::Type::Float

#team_abbreviation ⇒ String?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String, nil) —

    the team abbreviation



41
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 41

attribute :team_abbreviation, Shale::Type::String

#team_id ⇒ Integer?

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer, nil) —

    the team ID



33
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 33

attribute :team_id, Shale::Type::Integer

#tov ⇒ Float?

Returns turnovers

Examples:

stat.tov #=> 0.4

Returns:

  • (Float, nil) —

    turnovers



209
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 209

attribute :tov, Shale::Type::Float

#w ⇒ Integer?

Returns wins

Examples:

stat.w #=> 46

Returns:

  • (Integer, nil) —

    wins



73
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 73

attribute :w, Shale::Type::Integer

#w_pct ⇒ Float?

Returns win percentage

Examples:

stat.w_pct #=> 0.622

Returns:

  • (Float, nil) —

    win percentage



89
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 89

attribute :w_pct, Shale::Type::Float

Instance Method Details

#player ⇒ Player?

Returns the player object

Examples:

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

Returns:

  • (Player, nil) —

    the player object



257
258
259
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 257

def player
  Players.find(player_id)
end

#team ⇒ Team?

Returns the team object

Examples:

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

Returns:

  • (Team, nil) —

    the team object



267
268
269
# File 'lib/nba/league_dash_player_clutch_stat.rb', line 267

def team
  Teams.find(team_id)
end