Class: NBA::LeagueHustleStatsPlayerStat

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

Overview

Represents league-wide hustle statistics for a player

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ageInteger

Returns the player’s age

Examples:

stat.age #=> 36

Returns:

  • (Integer)

    the age



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

attribute :age, Shale::Type::Integer

#box_out_player_rebsInteger

Returns player rebounds from box outs

Examples:

stat.box_out_player_rebs #=> 22

Returns:

  • (Integer)

    player rebounds from box outs



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

attribute :box_out_player_rebs, Shale::Type::Integer

#box_out_player_team_rebsInteger

Returns team rebounds from player box outs

Examples:

stat.box_out_player_team_rebs #=> 38

Returns:

  • (Integer)

    team rebounds from box outs



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

attribute :box_out_player_team_rebs, Shale::Type::Integer

#box_outsInteger

Returns total box outs

Examples:

stat.box_outs #=> 57

Returns:

  • (Integer)

    total box outs



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

attribute :box_outs, Shale::Type::Integer

#charges_drawnInteger

Returns charges drawn

Examples:

stat.charges_drawn #=> 5

Returns:

  • (Integer)

    charges drawn



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

attribute :charges_drawn, Shale::Type::Integer

#contested_shotsInteger

Returns contested shots

Examples:

stat.contested_shots #=> 156

Returns:

  • (Integer)

    contested shots



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

attribute :contested_shots, Shale::Type::Integer

#contested_shots_2ptInteger

Returns contested 2-point shots

Examples:

stat.contested_shots_2pt #=> 98

Returns:

  • (Integer)

    contested 2-point shots



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

attribute :contested_shots_2pt, Shale::Type::Integer

#contested_shots_3ptInteger

Returns contested 3-point shots

Examples:

stat.contested_shots_3pt #=> 58

Returns:

  • (Integer)

    contested 3-point shots



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

attribute :contested_shots_3pt, Shale::Type::Integer

#def_boxoutsInteger

Returns defensive box outs

Examples:

stat.def_boxouts #=> 45

Returns:

  • (Integer)

    defensive box outs



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

attribute :def_boxouts, Shale::Type::Integer

#def_loose_balls_recoveredInteger

Returns defensive loose balls recovered

Examples:

stat.def_loose_balls_recovered #=> 35

Returns:

  • (Integer)

    defensive loose balls recovered



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

attribute :def_loose_balls_recovered, Shale::Type::Integer

#deflectionsInteger

Returns deflections

Examples:

stat.deflections #=> 85

Returns:

  • (Integer)

    deflections



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

attribute :deflections, Shale::Type::Integer

#gInteger

Returns games played

Examples:

stat.g #=> 72

Returns:

  • (Integer)

    games played



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

attribute :g, Shale::Type::Integer

#loose_balls_recoveredInteger

Returns total loose balls recovered

Examples:

stat.loose_balls_recovered #=> 60

Returns:

  • (Integer)

    loose balls recovered



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

attribute :loose_balls_recovered, Shale::Type::Integer

#minFloat

Returns total minutes played

Examples:

stat.min #=> 2484.5

Returns:

  • (Float)

    total minutes



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

attribute :min, Shale::Type::Float

#off_boxoutsInteger

Returns offensive box outs

Examples:

stat.off_boxouts #=> 12

Returns:

  • (Integer)

    offensive box outs



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

attribute :off_boxouts, Shale::Type::Integer

#off_loose_balls_recoveredInteger

Returns offensive loose balls recovered

Examples:

stat.off_loose_balls_recovered #=> 25

Returns:

  • (Integer)

    offensive loose balls recovered



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

attribute :off_loose_balls_recovered, Shale::Type::Integer

#pct_box_outs_defFloat

Returns percentage of defensive box outs

Examples:

stat.pct_box_outs_def #=> 0.789

Returns:

  • (Float)

    percentage of defensive box outs



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

attribute :pct_box_outs_def, Shale::Type::Float

#pct_box_outs_offFloat

Returns percentage of offensive box outs

Examples:

stat.pct_box_outs_off #=> 0.211

Returns:

  • (Float)

    percentage of offensive box outs



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

attribute :pct_box_outs_off, Shale::Type::Float

#pct_box_outs_rebFloat

Returns percentage of box outs resulting in player rebounds

Examples:

stat.pct_box_outs_reb #=> 0.386

Returns:

  • (Float)

    percentage of box outs resulting in player rebounds



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

attribute :pct_box_outs_reb, Shale::Type::Float

#pct_box_outs_team_rebFloat

Returns percentage of box outs resulting in team rebounds

Examples:

stat.pct_box_outs_team_reb #=> 0.667

Returns:

  • (Float)

    percentage of box outs resulting in team rebounds



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

attribute :pct_box_outs_team_reb, Shale::Type::Float

#pct_loose_balls_recovered_defFloat

Returns percentage of defensive loose balls recovered

Examples:

stat.pct_loose_balls_recovered_def #=> 0.583

Returns:

  • (Float)

    percentage of defensive loose balls recovered



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

attribute :pct_loose_balls_recovered_def, Shale::Type::Float

#pct_loose_balls_recovered_offFloat

Returns percentage of offensive loose balls recovered

Examples:

stat.pct_loose_balls_recovered_off #=> 0.417

Returns:

  • (Float)

    percentage of offensive loose balls recovered



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

attribute :pct_loose_balls_recovered_off, Shale::Type::Float

#player_idInteger

Returns the player ID

Examples:

stat.player_id #=> 201939

Returns:

  • (Integer)

    the player ID



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

attribute :player_id, Shale::Type::Integer

#player_nameString

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"

Returns:

  • (String)

    the player name



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

attribute :player_name, Shale::Type::String

#screen_assistsInteger

Returns screen assists

Examples:

stat.screen_assists #=> 142

Returns:

  • (Integer)

    screen assists



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

attribute :screen_assists, Shale::Type::Integer

#screen_ast_ptsInteger

Returns points from screen assists

Examples:

stat.screen_ast_pts #=> 284

Returns:

  • (Integer)

    screen assist points



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

attribute :screen_ast_pts, Shale::Type::Integer

#team_abbreviationString

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String)

    the team abbreviation



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

attribute :team_abbreviation, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer)

    the team ID



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

attribute :team_id, Shale::Type::Integer

Instance Method Details

#playerPlayer?

Returns the player object

Examples:

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

Returns:

  • (Player, nil)

    the player object



239
240
241
# File 'lib/nba/league_hustle_stats_player_stat.rb', line 239

def player
  Players.find(player_id)
end

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • (Team, nil)

    the team object



249
250
251
# File 'lib/nba/league_hustle_stats_player_stat.rb', line 249

def team
  Teams.find(team_id)
end