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_indicatorString

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

#conferenceString

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_groupString

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_rankInteger

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

#lossesInteger

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_againstInteger

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_diffInteger

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_forInteger

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_idString

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_abbreviationString

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_cityString

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_idInteger

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_nameString

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_slugString

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_pctFloat

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

#winsInteger

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

#teamTeam?

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