Class: NBA::LeagueDashLineupStat

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

Overview

Represents a lineup’s league dashboard statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astFloat?

Returns assists

Examples:

stat.ast #=> 5.5

Returns:

  • (Float, nil)

    assists



194
# File 'lib/nba/league_dash_lineup_stat.rb', line 194

attribute :ast, Shale::Type::Float

#blkFloat?

Returns blocks

Examples:

stat.blk #=> 0.8

Returns:

  • (Float, nil)

    blocks



218
# File 'lib/nba/league_dash_lineup_stat.rb', line 218

attribute :blk, Shale::Type::Float

#blkaFloat?

Returns blocked attempts

Examples:

stat.blka #=> 0.5

Returns:

  • (Float, nil)

    blocked attempts



226
# File 'lib/nba/league_dash_lineup_stat.rb', line 226

attribute :blka, Shale::Type::Float

#drebFloat?

Returns defensive rebounds

Examples:

stat.dreb #=> 6.2

Returns:

  • (Float, nil)

    defensive rebounds



178
# File 'lib/nba/league_dash_lineup_stat.rb', line 178

attribute :dreb, Shale::Type::Float

#fg3_pctFloat?

Returns three-point percentage

Examples:

stat.fg3_pct #=> 0.376

Returns:

  • (Float, nil)

    three-point percentage



138
# File 'lib/nba/league_dash_lineup_stat.rb', line 138

attribute :fg3_pct, Shale::Type::Float

#fg3aFloat?

Returns three-pointers attempted

Examples:

stat.fg3a #=> 8.5

Returns:

  • (Float, nil)

    three-pointers attempted



130
# File 'lib/nba/league_dash_lineup_stat.rb', line 130

attribute :fg3a, Shale::Type::Float

#fg3mFloat?

Returns three-pointers made

Examples:

stat.fg3m #=> 3.2

Returns:

  • (Float, nil)

    three-pointers made



122
# File 'lib/nba/league_dash_lineup_stat.rb', line 122

attribute :fg3m, Shale::Type::Float

#fg_pctFloat?

Returns field goal percentage

Examples:

stat.fg_pct #=> 0.494

Returns:

  • (Float, nil)

    field goal percentage



114
# File 'lib/nba/league_dash_lineup_stat.rb', line 114

attribute :fg_pct, Shale::Type::Float

#fgaFloat?

Returns field goals attempted

Examples:

stat.fga #=> 17.2

Returns:

  • (Float, nil)

    field goals attempted



106
# File 'lib/nba/league_dash_lineup_stat.rb', line 106

attribute :fga, Shale::Type::Float

#fgmFloat?

Returns field goals made

Examples:

stat.fgm #=> 8.5

Returns:

  • (Float, nil)

    field goals made



98
# File 'lib/nba/league_dash_lineup_stat.rb', line 98

attribute :fgm, Shale::Type::Float

#ft_pctFloat?

Returns free throw percentage

Examples:

stat.ft_pct #=> 0.816

Returns:

  • (Float, nil)

    free throw percentage



162
# File 'lib/nba/league_dash_lineup_stat.rb', line 162

attribute :ft_pct, Shale::Type::Float

#ftaFloat?

Returns free throws attempted

Examples:

stat.fta #=> 3.8

Returns:

  • (Float, nil)

    free throws attempted



154
# File 'lib/nba/league_dash_lineup_stat.rb', line 154

attribute :fta, Shale::Type::Float

#ftmFloat?

Returns free throws made

Examples:

stat.ftm #=> 3.1

Returns:

  • (Float, nil)

    free throws made



146
# File 'lib/nba/league_dash_lineup_stat.rb', line 146

attribute :ftm, Shale::Type::Float

#gpInteger?

Returns games played

Examples:

stat.gp #=> 45

Returns:

  • (Integer, nil)

    games played



58
# File 'lib/nba/league_dash_lineup_stat.rb', line 58

attribute :gp, Shale::Type::Integer

#group_idString?

Returns the lineup group ID

Examples:

stat.group_id #=> "201939-203110-1628369"

Returns:

  • (String, nil)

    the group ID



26
# File 'lib/nba/league_dash_lineup_stat.rb', line 26

attribute :group_id, Shale::Type::String

#group_nameString?

Returns the lineup group name

Examples:

stat.group_name #=> "S. Curry - K. Thompson - A. Wiggins"

Returns:

  • (String, nil)

    the group name



34
# File 'lib/nba/league_dash_lineup_stat.rb', line 34

attribute :group_name, Shale::Type::String

#group_setString?

Returns the group set (e.g., “5-man lineups”)

Examples:

stat.group_set #=> "5 Man Lineups"

Returns:

  • (String, nil)

    the group set



18
# File 'lib/nba/league_dash_lineup_stat.rb', line 18

attribute :group_set, Shale::Type::String

#lInteger?

Returns losses

Examples:

stat.l #=> 15

Returns:

  • (Integer, nil)

    losses



74
# File 'lib/nba/league_dash_lineup_stat.rb', line 74

attribute :l, Shale::Type::Integer

#minFloat?

Returns minutes played

Examples:

stat.min #=> 245.5

Returns:

  • (Float, nil)

    minutes played



90
# File 'lib/nba/league_dash_lineup_stat.rb', line 90

attribute :min, Shale::Type::Float

#orebFloat?

Returns offensive rebounds

Examples:

stat.oreb #=> 1.8

Returns:

  • (Float, nil)

    offensive rebounds



170
# File 'lib/nba/league_dash_lineup_stat.rb', line 170

attribute :oreb, Shale::Type::Float

#pfFloat?

Returns personal fouls

Examples:

stat.pf #=> 2.3

Returns:

  • (Float, nil)

    personal fouls



234
# File 'lib/nba/league_dash_lineup_stat.rb', line 234

attribute :pf, Shale::Type::Float

#pfdFloat?

Returns personal fouls drawn

Examples:

stat.pfd #=> 3.1

Returns:

  • (Float, nil)

    personal fouls drawn



242
# File 'lib/nba/league_dash_lineup_stat.rb', line 242

attribute :pfd, Shale::Type::Float

#plus_minusFloat?

Returns plus/minus

Examples:

stat.plus_minus #=> 8.5

Returns:

  • (Float, nil)

    plus/minus



258
# File 'lib/nba/league_dash_lineup_stat.rb', line 258

attribute :plus_minus, Shale::Type::Float

#ptsFloat?

Returns points

Examples:

stat.pts #=> 23.3

Returns:

  • (Float, nil)

    points



250
# File 'lib/nba/league_dash_lineup_stat.rb', line 250

attribute :pts, Shale::Type::Float

#rebFloat?

Returns total rebounds

Examples:

stat.reb #=> 8.0

Returns:

  • (Float, nil)

    total rebounds



186
# File 'lib/nba/league_dash_lineup_stat.rb', line 186

attribute :reb, Shale::Type::Float

#stlFloat?

Returns steals

Examples:

stat.stl #=> 1.5

Returns:

  • (Float, nil)

    steals



210
# File 'lib/nba/league_dash_lineup_stat.rb', line 210

attribute :stl, Shale::Type::Float

#team_abbreviationString?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String, nil)

    the team abbreviation



50
# File 'lib/nba/league_dash_lineup_stat.rb', line 50

attribute :team_abbreviation, Shale::Type::String

#team_idInteger?

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer, nil)

    the team ID



42
# File 'lib/nba/league_dash_lineup_stat.rb', line 42

attribute :team_id, Shale::Type::Integer

#tovFloat?

Returns turnovers

Examples:

stat.tov #=> 2.1

Returns:

  • (Float, nil)

    turnovers



202
# File 'lib/nba/league_dash_lineup_stat.rb', line 202

attribute :tov, Shale::Type::Float

#wInteger?

Returns wins

Examples:

stat.w #=> 30

Returns:

  • (Integer, nil)

    wins



66
# File 'lib/nba/league_dash_lineup_stat.rb', line 66

attribute :w, Shale::Type::Integer

#w_pctFloat?

Returns win percentage

Examples:

stat.w_pct #=> 0.667

Returns:

  • (Float, nil)

    win percentage



82
# File 'lib/nba/league_dash_lineup_stat.rb', line 82

attribute :w_pct, Shale::Type::Float

Instance Method Details

#teamTeam?

Returns the team

Examples:

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

Returns:

  • (Team, nil)

    the team object



266
267
268
# File 'lib/nba/league_dash_lineup_stat.rb', line 266

def team
  Teams.find(team_id)
end