Class: NBA::IstStanding

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

Overview

Represents an In-Season Tournament standing entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clinch_indicator ⇒ String

Returns the clinch indicator

Examples:

standing.clinch_indicator #=> "z"

Returns:

  • (String) —

    the clinch indicator



136
# File 'lib/nba/ist_standing.rb', line 136

attribute :clinch_indicator, Shale::Type::String

#conference ⇒ String

Returns the conference

Examples:

standing.conference #=> "West"

Returns:

  • (String) —

    the conference



64
# File 'lib/nba/ist_standing.rb', line 64

attribute :conference, Shale::Type::String

#ist_group ⇒ String

Returns the IST group

Examples:

standing.ist_group #=> "West Group A"

Returns:

  • (String) —

    the IST group



72
# File 'lib/nba/ist_standing.rb', line 72

attribute :ist_group, Shale::Type::String

#ist_group_rank ⇒ Integer

Returns the rank within IST group

Examples:

standing.ist_group_rank #=> 1

Returns:

  • (Integer) —

    the IST group rank



80
# File 'lib/nba/ist_standing.rb', line 80

attribute :ist_group_rank, Shale::Type::Integer

#losses ⇒ Integer

Returns the number of losses

Examples:

standing.losses #=> 1

Returns:

  • (Integer) —

    the number of losses



96
# File 'lib/nba/ist_standing.rb', line 96

attribute :losses, Shale::Type::Integer

#pts_against ⇒ Integer

Returns total points allowed

Examples:

standing.pts_against #=> 420

Returns:

  • (Integer) —

    points allowed



120
# File 'lib/nba/ist_standing.rb', line 120

attribute :pts_against, Shale::Type::Integer

#pts_diff ⇒ Integer

Returns the point differential

Examples:

standing.pts_diff #=> 30

Returns:

  • (Integer) —

    the point differential



128
# File 'lib/nba/ist_standing.rb', line 128

attribute :pts_diff, Shale::Type::Integer

#pts_for ⇒ Integer

Returns total points scored

Examples:

standing.pts_for #=> 450

Returns:

  • (Integer) —

    points scored



112
# File 'lib/nba/ist_standing.rb', line 112

attribute :pts_for, Shale::Type::Integer

#season_id ⇒ String

Returns the season ID

Examples:

standing.season_id #=> "2023-24"

Returns:

  • (String) —

    the season ID



16
# File 'lib/nba/ist_standing.rb', line 16

attribute :season_id, Shale::Type::String

#team_abbreviation ⇒ String

Returns the team abbreviation

Examples:

standing.team_abbreviation #=> "LAL"

Returns:

  • (String) —

    the team abbreviation



48
# File 'lib/nba/ist_standing.rb', line 48

attribute :team_abbreviation, Shale::Type::String

#team_city ⇒ String

Returns the team city

Examples:

standing.team_city #=> "Los Angeles"

Returns:

  • (String) —

    the team city



32
# File 'lib/nba/ist_standing.rb', line 32

attribute :team_city, Shale::Type::String

#team_id ⇒ Integer

Returns the team ID

Examples:

standing.team_id #=> 1610612747

Returns:

  • (Integer) —

    the team ID



24
# File 'lib/nba/ist_standing.rb', line 24

attribute :team_id, Shale::Type::Integer

#team_name ⇒ String

Returns the team name

Examples:

standing.team_name #=> "Lakers"

Returns:

  • (String) —

    the team name



40
# File 'lib/nba/ist_standing.rb', line 40

attribute :team_name, Shale::Type::String

#team_slug ⇒ String

Returns the team slug

Examples:

standing.team_slug #=> "lakers"

Returns:

  • (String) —

    the team slug



56
# File 'lib/nba/ist_standing.rb', line 56

attribute :team_slug, Shale::Type::String

#win_pct ⇒ Float

Returns the win percentage

Examples:

standing.win_pct #=> 0.750

Returns:

  • (Float) —

    the win percentage



104
# File 'lib/nba/ist_standing.rb', line 104

attribute :win_pct, Shale::Type::Float

#wins ⇒ Integer

Returns the number of wins

Examples:

standing.wins #=> 3

Returns:

  • (Integer) —

    the number of wins



88
# File 'lib/nba/ist_standing.rb', line 88

attribute :wins, Shale::Type::Integer

Instance Method Details

#team ⇒ Team?

Returns the team object

Examples:

standing.team #=> #<NBA::Team>

Returns:

  • (Team, nil) —

    the team object



144
145
146
# File 'lib/nba/ist_standing.rb', line 144

def team
  Teams.find(team_id)
end