Class: NBA::LeagueDashPtTeamDefendStat

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

Overview

Represents league-wide team defensive statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#d_fg_pctFloat?

Returns defended field goal percentage

Examples:

stat.d_fg_pct #=> 0.400


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

attribute :d_fg_pct, Shale::Type::Float

#d_fgaFloat?

Returns defended field goals attempted

Examples:

stat.d_fga #=> 612.0


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

attribute :d_fga, Shale::Type::Float

#d_fgmFloat?

Returns defended field goals made

Examples:

stat.d_fgm #=> 245.0


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

attribute :d_fgm, Shale::Type::Float

#freqFloat?

Returns frequency percentage

Examples:

stat.freq #=> 0.089


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

attribute :freq, Shale::Type::Float

#gInteger?

Returns games (alias for games played)

Examples:

stat.g #=> 82


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

attribute :g, Shale::Type::Integer

#gpInteger?

Returns games played

Examples:

stat.gp #=> 82


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

attribute :gp, Shale::Type::Integer

#normal_fg_pctFloat?

Returns normal (uncontested) field goal percentage

Examples:

stat.normal_fg_pct #=> 0.450


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

attribute :normal_fg_pct, Shale::Type::Float

#pct_plusminusFloat?

Returns percentage plus/minus (difference from normal)

Examples:

stat.pct_plusminus #=> -0.050


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

attribute :pct_plusminus, Shale::Type::Float

#team_abbreviationString?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"


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

attribute :team_abbreviation, Shale::Type::String

#team_idInteger?

Returns the team ID

Examples:

stat.team_id #=> 1610612744


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

attribute :team_id, Shale::Type::Integer

#team_nameString?

Returns the team name

Examples:

stat.team_name #=> "Golden State Warriors"


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

attribute :team_name, Shale::Type::String

Instance Method Details

#teamTeam?

Returns the team

Examples:

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


106
107
108
# File 'lib/nba/league_dash_pt_team_defend_stat.rb', line 106

def team
  Teams.find(team_id)
end