Class: NBA::LeagueStanding
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::LeagueStanding
- Defined in:
- lib/nba/league_standing.rb
Overview
Represents a team’s standing with extended information
Instance Attribute Summary collapse
-
#clinch_indicator ⇒ String
Returns the clinch indicator.
-
#clinched_conference_title ⇒ Integer
Returns if team clinched conference title.
-
#clinched_playoff_birth ⇒ Integer
Returns if team clinched playoff berth.
-
#conference ⇒ String
Returns the conference.
-
#conference_games_back ⇒ Float
Returns games back in the conference.
-
#conference_record ⇒ String
Returns the conference record.
-
#current_streak ⇒ String
Returns the current streak.
-
#diff_points_pg ⇒ Float
Returns point differential per game.
-
#division ⇒ String
Returns the division.
-
#division_rank ⇒ Integer
Returns the division rank.
-
#division_record ⇒ String
Returns the division record.
-
#eliminated_conference ⇒ Integer
Returns if team is eliminated from conference.
-
#home_record ⇒ String
Returns the home record.
-
#l10_record ⇒ String
Returns the last 10 games record.
-
#league_id ⇒ String
Returns the league ID.
-
#league_rank ⇒ Integer
Returns the league rank.
-
#long_loss_streak ⇒ Integer
Returns the longest loss streak.
-
#long_win_streak ⇒ Integer
Returns the longest win streak.
-
#losses ⇒ Integer
Returns the number of losses.
-
#opp_points_pg ⇒ Float
Returns opponent points per game.
-
#playoff_rank ⇒ Integer
Returns the playoff rank.
-
#points_pg ⇒ Float
Returns points per game.
-
#record ⇒ String
Returns the full record string.
-
#road_record ⇒ String
Returns the road record.
-
#season_id ⇒ String
Returns the season ID.
-
#team_city ⇒ String
Returns the team city.
-
#team_id ⇒ Integer
Returns the team ID.
-
#team_name ⇒ String
Returns the team name.
-
#team_slug ⇒ String
Returns the team slug.
-
#win_pct ⇒ Float
Returns the win percentage.
-
#wins ⇒ Integer
Returns the number of wins.
Instance Method Summary collapse
-
#full_name ⇒ String
Returns the full team name.
-
#playoffs? ⇒ Boolean
Returns whether the team made the playoffs.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#clinch_indicator ⇒ String
Returns the clinch indicator
84 |
# File 'lib/nba/league_standing.rb', line 84 attribute :clinch_indicator, Shale::Type::String |
#clinched_conference_title ⇒ Integer
Returns if team clinched conference title
212 |
# File 'lib/nba/league_standing.rb', line 212 attribute :clinched_conference_title, Shale::Type::Integer |
#clinched_playoff_birth ⇒ Integer
Returns if team clinched playoff berth
220 |
# File 'lib/nba/league_standing.rb', line 220 attribute :clinched_playoff_birth, Shale::Type::Integer |
#conference ⇒ String
Returns the conference
60 |
# File 'lib/nba/league_standing.rb', line 60 attribute :conference, Shale::Type::String |
#conference_games_back ⇒ Float
Returns games back in the conference
204 |
# File 'lib/nba/league_standing.rb', line 204 attribute :conference_games_back, Shale::Type::Float |
#conference_record ⇒ String
Returns the conference record
68 |
# File 'lib/nba/league_standing.rb', line 68 attribute :conference_record, Shale::Type::String |
#current_streak ⇒ String
Returns the current streak
196 |
# File 'lib/nba/league_standing.rb', line 196 attribute :current_streak, Shale::Type::String |
#diff_points_pg ⇒ Float
Returns point differential per game
252 |
# File 'lib/nba/league_standing.rb', line 252 attribute :diff_points_pg, Shale::Type::Float |
#division ⇒ String
Returns the division
92 |
# File 'lib/nba/league_standing.rb', line 92 attribute :division, Shale::Type::String |
#division_rank ⇒ Integer
Returns the division rank
108 |
# File 'lib/nba/league_standing.rb', line 108 attribute :division_rank, Shale::Type::Integer |
#division_record ⇒ String
Returns the division record
100 |
# File 'lib/nba/league_standing.rb', line 100 attribute :division_record, Shale::Type::String |
#eliminated_conference ⇒ Integer
Returns if team is eliminated from conference
228 |
# File 'lib/nba/league_standing.rb', line 228 attribute :eliminated_conference, Shale::Type::Integer |
#home_record ⇒ String
Returns the home record
156 |
# File 'lib/nba/league_standing.rb', line 156 attribute :home_record, Shale::Type::String |
#l10_record ⇒ String
Returns the last 10 games record
172 |
# File 'lib/nba/league_standing.rb', line 172 attribute :l10_record, Shale::Type::String |
#league_id ⇒ String
Returns the league ID
12 |
# File 'lib/nba/league_standing.rb', line 12 attribute :league_id, Shale::Type::String |
#league_rank ⇒ Integer
Returns the league rank
140 |
# File 'lib/nba/league_standing.rb', line 140 attribute :league_rank, Shale::Type::Integer |
#long_loss_streak ⇒ Integer
Returns the longest loss streak
188 |
# File 'lib/nba/league_standing.rb', line 188 attribute :long_loss_streak, Shale::Type::Integer |
#long_win_streak ⇒ Integer
Returns the longest win streak
180 |
# File 'lib/nba/league_standing.rb', line 180 attribute :long_win_streak, Shale::Type::Integer |
#losses ⇒ Integer
Returns the number of losses
124 |
# File 'lib/nba/league_standing.rb', line 124 attribute :losses, Shale::Type::Integer |
#opp_points_pg ⇒ Float
Returns opponent points per game
244 |
# File 'lib/nba/league_standing.rb', line 244 attribute :opp_points_pg, Shale::Type::Float |
#playoff_rank ⇒ Integer
Returns the playoff rank
76 |
# File 'lib/nba/league_standing.rb', line 76 attribute :playoff_rank, Shale::Type::Integer |
#points_pg ⇒ Float
Returns points per game
236 |
# File 'lib/nba/league_standing.rb', line 236 attribute :points_pg, Shale::Type::Float |
#record ⇒ String
Returns the full record string
148 |
# File 'lib/nba/league_standing.rb', line 148 attribute :record, Shale::Type::String |
#road_record ⇒ String
Returns the road record
164 |
# File 'lib/nba/league_standing.rb', line 164 attribute :road_record, Shale::Type::String |
#season_id ⇒ String
Returns the season ID
20 |
# File 'lib/nba/league_standing.rb', line 20 attribute :season_id, Shale::Type::String |
#team_city ⇒ String
Returns the team city
36 |
# File 'lib/nba/league_standing.rb', line 36 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
28 |
# File 'lib/nba/league_standing.rb', line 28 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the team name
44 |
# File 'lib/nba/league_standing.rb', line 44 attribute :team_name, Shale::Type::String |
#team_slug ⇒ String
Returns the team slug
52 |
# File 'lib/nba/league_standing.rb', line 52 attribute :team_slug, Shale::Type::String |
#win_pct ⇒ Float
Returns the win percentage
132 |
# File 'lib/nba/league_standing.rb', line 132 attribute :win_pct, Shale::Type::Float |
#wins ⇒ Integer
Returns the number of wins
116 |
# File 'lib/nba/league_standing.rb', line 116 attribute :wins, Shale::Type::Integer |
Instance Method Details
#full_name ⇒ String
Returns the full team name
270 271 272 |
# File 'lib/nba/league_standing.rb', line 270 def full_name "#{team_city} #{team_name}".strip end |
#playoffs? ⇒ Boolean
Returns whether the team made the playoffs
280 281 282 |
# File 'lib/nba/league_standing.rb', line 280 def playoffs? clinched_playoff_birth.eql?(1) end |
#team ⇒ Team?
Returns the team object
260 261 262 |
# File 'lib/nba/league_standing.rb', line 260 def team Teams.find(team_id) end |