Class: NBA::LeagueDashTeamPtShotStat

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

Overview

Represents league-wide team tracking shot statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#efg_pct ⇒ Float?

Returns effective field goal percentage

Examples:

stat.efg_pct #=> 0.561

Returns:

  • (Float, nil) —

    effective field goal percentage



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

attribute :efg_pct, Shale::Type::Float

#fg2_pct ⇒ Float?

Returns 2-point field goal percentage

Examples:

stat.fg2_pct #=> 0.526

Returns:

  • (Float, nil) —

    2-point field goal percentage



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

attribute :fg2_pct, Shale::Type::Float

#fg2a ⇒ Float?

Returns 2-point field goals attempted

Examples:

stat.fg2a #=> 7.8

Returns:

  • (Float, nil) —

    2-point field goals attempted



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

attribute :fg2a, Shale::Type::Float

#fg2a_frequency ⇒ Float?

Returns 2-point field goal attempt frequency

Examples:

stat.fg2a_frequency #=> 0.45

Returns:

  • (Float, nil) —

    2-point field goal attempt frequency



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

attribute :fg2a_frequency, Shale::Type::Float

#fg2m ⇒ Float?

Returns 2-point field goals made

Examples:

stat.fg2m #=> 4.1

Returns:

  • (Float, nil) —

    2-point field goals made



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

attribute :fg2m, Shale::Type::Float

#fg3_pct ⇒ Float?

Returns 3-point field goal percentage

Examples:

stat.fg3_pct #=> 0.428

Returns:

  • (Float, nil) —

    3-point field goal percentage



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

attribute :fg3_pct, Shale::Type::Float

#fg3a ⇒ Float?

Returns 3-point field goals attempted

Examples:

stat.fg3a #=> 11.2

Returns:

  • (Float, nil) —

    3-point field goals attempted



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

attribute :fg3a, Shale::Type::Float

#fg3a_frequency ⇒ Float?

Returns 3-point field goal attempt frequency

Examples:

stat.fg3a_frequency #=> 0.55

Returns:

  • (Float, nil) —

    3-point field goal attempt frequency



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

attribute :fg3a_frequency, Shale::Type::Float

#fg3m ⇒ Float?

Returns 3-point field goals made

Examples:

stat.fg3m #=> 4.8

Returns:

  • (Float, nil) —

    3-point field goals made



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

attribute :fg3m, Shale::Type::Float

#fg_pct ⇒ Float?

Returns field goal percentage

Examples:

stat.fg_pct #=> 0.472

Returns:

  • (Float, nil) —

    field goal percentage



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

attribute :fg_pct, Shale::Type::Float

#fga ⇒ Float?

Returns field goals attempted

Examples:

stat.fga #=> 15.3

Returns:

  • (Float, nil) —

    field goals attempted



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

attribute :fga, Shale::Type::Float

#fga_frequency ⇒ Float?

Returns field goal attempt frequency

Examples:

stat.fga_frequency #=> 0.35

Returns:

  • (Float, nil) —

    field goal attempt frequency



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

attribute :fga_frequency, Shale::Type::Float

#fgm ⇒ Float?

Returns field goals made

Examples:

stat.fgm #=> 7.2

Returns:

  • (Float, nil) —

    field goals made



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

attribute :fgm, Shale::Type::Float

#g ⇒ Integer?

Returns number of games

Examples:

stat.g #=> 82

Returns:

  • (Integer, nil) —

    games



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

attribute :g, Shale::Type::Integer

#gp ⇒ Integer?

Returns games played

Examples:

stat.gp #=> 82

Returns:

  • (Integer, nil) —

    games played



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

attribute :gp, Shale::Type::Integer

#team_abbreviation ⇒ String?

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String, nil) —

    the team's abbreviation



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

attribute :team_abbreviation, Shale::Type::String

#team_id ⇒ Integer?

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer, nil) —

    the team's ID



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

attribute :team_id, Shale::Type::Integer

#team_name ⇒ String?

Returns the team name

Examples:

stat.team_name #=> "Golden State Warriors"

Returns:

  • (String, nil) —

    the team's name



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

attribute :team_name, Shale::Type::String

Instance Method Details

#team ⇒ Team?

Returns the team

Examples:

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

Returns:

  • (Team, nil) —

    the team object



162
163
164
# File 'lib/nba/league_dash_team_pt_shot_stat.rb', line 162

def team
  Teams.find(team_id)
end