Class: NBA::LeagueDashPlayerBioStat

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

Overview

Represents league-wide player biographical statistics

API:

  • public

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ageFloat?

Returns the player’s age

Examples:

stat.age #=> 36

Returns:

  • the player’s age

API:

  • public



51
# File 'lib/nba/league_dash_player_bio_stat.rb', line 51

attribute :age, Shale::Type::Float

#astFloat?

Returns assists per game

Examples:

stat.ast #=> 6.1

Returns:

  • assists per game

API:

  • public



147
# File 'lib/nba/league_dash_player_bio_stat.rb', line 147

attribute :ast, Shale::Type::Float

#ast_pctFloat?

Returns assist percentage

Examples:

stat.ast_pct #=> 0.312

Returns:

  • assist percentage

API:

  • public



195
# File 'lib/nba/league_dash_player_bio_stat.rb', line 195

attribute :ast_pct, Shale::Type::Float

#collegeString?

Returns the player’s college

Examples:

stat.college #=> "Davidson"

Returns:

  • the player’s college

API:

  • public



83
# File 'lib/nba/league_dash_player_bio_stat.rb', line 83

attribute :college, Shale::Type::String

#countryString?

Returns the player’s country

Examples:

stat.country #=> "USA"

Returns:

  • the player’s country

API:

  • public



91
# File 'lib/nba/league_dash_player_bio_stat.rb', line 91

attribute :country, Shale::Type::String

#draft_numberString?

Returns the player’s draft number

Examples:

stat.draft_number #=> "7"

Returns:

  • the player’s draft number

API:

  • public



115
# File 'lib/nba/league_dash_player_bio_stat.rb', line 115

attribute :draft_number, Shale::Type::String

#draft_roundString?

Returns the player’s draft round

Examples:

stat.draft_round #=> "1"

Returns:

  • the player’s draft round

API:

  • public



107
# File 'lib/nba/league_dash_player_bio_stat.rb', line 107

attribute :draft_round, Shale::Type::String

#draft_yearString?

Returns the player’s draft year

Examples:

stat.draft_year #=> "2009"

Returns:

  • the player’s draft year

API:

  • public



99
# File 'lib/nba/league_dash_player_bio_stat.rb', line 99

attribute :draft_year, Shale::Type::String

#dreb_pctFloat?

Returns defensive rebound percentage

Examples:

stat.dreb_pct #=> 0.112

Returns:

  • defensive rebound percentage

API:

  • public



171
# File 'lib/nba/league_dash_player_bio_stat.rb', line 171

attribute :dreb_pct, Shale::Type::Float

#gpInteger?

Returns games played

Examples:

stat.gp #=> 74

Returns:

  • games played

API:

  • public



123
# File 'lib/nba/league_dash_player_bio_stat.rb', line 123

attribute :gp, Shale::Type::Integer

#net_ratingFloat?

Returns net rating

Examples:

stat.net_rating #=> 8.5

Returns:

  • net rating

API:

  • public



155
# File 'lib/nba/league_dash_player_bio_stat.rb', line 155

attribute :net_rating, Shale::Type::Float

#oreb_pctFloat?

Returns offensive rebound percentage

Examples:

stat.oreb_pct #=> 0.025

Returns:

  • offensive rebound percentage

API:

  • public



163
# File 'lib/nba/league_dash_player_bio_stat.rb', line 163

attribute :oreb_pct, Shale::Type::Float

#player_heightString?

Returns the player’s height as a formatted string

Examples:

stat.player_height #=> "6-2"

Returns:

  • the player’s height

API:

  • public



59
# File 'lib/nba/league_dash_player_bio_stat.rb', line 59

attribute :player_height, Shale::Type::String

#player_height_inchesInteger?

Returns the player’s height in inches

Examples:

stat.player_height_inches #=> 74

Returns:

  • the player’s height in inches

API:

  • public



67
# File 'lib/nba/league_dash_player_bio_stat.rb', line 67

attribute :player_height_inches, Shale::Type::Integer

#player_idInteger?

Returns the player ID

Examples:

stat.player_id #=> 201939

Returns:

  • the player’s ID

API:

  • public



19
# File 'lib/nba/league_dash_player_bio_stat.rb', line 19

attribute :player_id, Shale::Type::Integer

#player_nameString?

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"

Returns:

  • the player’s name

API:

  • public



27
# File 'lib/nba/league_dash_player_bio_stat.rb', line 27

attribute :player_name, Shale::Type::String

#player_weightInteger?

Returns the player’s weight in pounds

Examples:

stat.player_weight #=> 185

Returns:

  • the player’s weight

API:

  • public



75
# File 'lib/nba/league_dash_player_bio_stat.rb', line 75

attribute :player_weight, Shale::Type::Integer

#ptsFloat?

Returns points per game

Examples:

stat.pts #=> 26.4

Returns:

  • points per game

API:

  • public



131
# File 'lib/nba/league_dash_player_bio_stat.rb', line 131

attribute :pts, Shale::Type::Float

#rebFloat?

Returns rebounds per game

Examples:

stat.reb #=> 5.2

Returns:

  • rebounds per game

API:

  • public



139
# File 'lib/nba/league_dash_player_bio_stat.rb', line 139

attribute :reb, Shale::Type::Float

#team_abbreviationString?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • the team’s abbreviation

API:

  • public



43
# File 'lib/nba/league_dash_player_bio_stat.rb', line 43

attribute :team_abbreviation, Shale::Type::String

#team_idInteger?

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • the team’s ID

API:

  • public



35
# File 'lib/nba/league_dash_player_bio_stat.rb', line 35

attribute :team_id, Shale::Type::Integer

#ts_pctFloat?

Returns true shooting percentage

Examples:

stat.ts_pct #=> 0.621

Returns:

  • true shooting percentage

API:

  • public



187
# File 'lib/nba/league_dash_player_bio_stat.rb', line 187

attribute :ts_pct, Shale::Type::Float

#usg_pctFloat?

Returns usage percentage

Examples:

stat.usg_pct #=> 0.298

Returns:

  • usage percentage

API:

  • public



179
# File 'lib/nba/league_dash_player_bio_stat.rb', line 179

attribute :usg_pct, Shale::Type::Float

Instance Method Details

#playerPlayer?

Returns the player

Examples:

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

Returns:

  • the player object

API:

  • public



203
204
205
# File 'lib/nba/league_dash_player_bio_stat.rb', line 203

def player
  Players.find(player_id)
end

#teamTeam?

Returns the team

Examples:

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

Returns:

  • the team object

API:

  • public



213
214
215
# File 'lib/nba/league_dash_player_bio_stat.rb', line 213

def team
  Teams.find(team_id)
end