Class: NBA::EstimatedMetricsStat

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

Overview

Represents player estimated metrics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#e_ast_ratioFloat

Returns estimated assist ratio

Examples:

stat.e_ast_ratio #=> 25.5


92
# File 'lib/nba/estimated_metrics_stat.rb', line 92

attribute :e_ast_ratio, Shale::Type::Float

#e_def_ratingFloat

Returns estimated defensive rating

Examples:

stat.e_def_rating #=> 110.2


76
# File 'lib/nba/estimated_metrics_stat.rb', line 76

attribute :e_def_rating, Shale::Type::Float

#e_dreb_pctFloat

Returns estimated defensive rebound percentage

Examples:

stat.e_dreb_pct #=> 15.5


108
# File 'lib/nba/estimated_metrics_stat.rb', line 108

attribute :e_dreb_pct, Shale::Type::Float

#e_net_ratingFloat

Returns estimated net rating

Examples:

stat.e_net_rating #=> 7.3


84
# File 'lib/nba/estimated_metrics_stat.rb', line 84

attribute :e_net_rating, Shale::Type::Float

#e_off_ratingFloat

Returns estimated offensive rating

Examples:

stat.e_off_rating #=> 117.5


68
# File 'lib/nba/estimated_metrics_stat.rb', line 68

attribute :e_off_rating, Shale::Type::Float

#e_oreb_pctFloat

Returns estimated offensive rebound percentage

Examples:

stat.e_oreb_pct #=> 2.5


100
# File 'lib/nba/estimated_metrics_stat.rb', line 100

attribute :e_oreb_pct, Shale::Type::Float

#e_paceFloat

Returns estimated pace

Examples:

stat.e_pace #=> 101.5


140
# File 'lib/nba/estimated_metrics_stat.rb', line 140

attribute :e_pace, Shale::Type::Float

#e_reb_pctFloat

Returns estimated rebound percentage

Examples:

stat.e_reb_pct #=> 9.5


116
# File 'lib/nba/estimated_metrics_stat.rb', line 116

attribute :e_reb_pct, Shale::Type::Float

#e_tov_pctFloat

Returns estimated turnover percentage

Examples:

stat.e_tov_pct #=> 11.5


124
# File 'lib/nba/estimated_metrics_stat.rb', line 124

attribute :e_tov_pct, Shale::Type::Float

#e_usg_pctFloat

Returns estimated usage percentage

Examples:

stat.e_usg_pct #=> 31.5


132
# File 'lib/nba/estimated_metrics_stat.rb', line 132

attribute :e_usg_pct, Shale::Type::Float

#gpInteger

Returns games played

Examples:

stat.gp #=> 74


28
# File 'lib/nba/estimated_metrics_stat.rb', line 28

attribute :gp, Shale::Type::Integer

#lInteger

Returns losses

Examples:

stat.l #=> 28


44
# File 'lib/nba/estimated_metrics_stat.rb', line 44

attribute :l, Shale::Type::Integer

#minFloat

Returns minutes per game

Examples:

stat.min #=> 32.7


60
# File 'lib/nba/estimated_metrics_stat.rb', line 60

attribute :min, Shale::Type::Float

#player_idInteger

Returns the player ID

Examples:

stat.player_id #=> 201939


12
# File 'lib/nba/estimated_metrics_stat.rb', line 12

attribute :player_id, Shale::Type::Integer

#player_nameString

Returns the player name

Examples:

stat.player_name #=> "Stephen Curry"


20
# File 'lib/nba/estimated_metrics_stat.rb', line 20

attribute :player_name, Shale::Type::String

#wInteger

Returns wins

Examples:

stat.w #=> 46


36
# File 'lib/nba/estimated_metrics_stat.rb', line 36

attribute :w, Shale::Type::Integer

#w_pctFloat

Returns win percentage

Examples:

stat.w_pct #=> 0.622


52
# File 'lib/nba/estimated_metrics_stat.rb', line 52

attribute :w_pct, Shale::Type::Float

Instance Method Details

#playerPlayer?

Returns the player object

Examples:

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


148
149
150
# File 'lib/nba/estimated_metrics_stat.rb', line 148

def player
  Players.find(player_id)
end