Class: MLB::TeamRecord

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/mlb/team_record.rb

Overview

Represents a team’s record in the standings

Instance Attribute Summary collapse

Instance Attribute Details

#clinchedBoolean Also known as: clinched?

Returns whether the team has clinched a playoff spot

Examples:

team_record.clinched #=> true

Returns:

  • (Boolean)

    whether the team has clinched



237
# File 'lib/mlb/team_record.rb', line 237

attribute :clinched, Shale::Type::Boolean

#division_champBoolean Also known as: division_champ?

Returns whether the team is a division champion

Examples:

team_record.division_champ #=> true

Returns:

  • (Boolean)

    whether the team is a division champion



221
# File 'lib/mlb/team_record.rb', line 221

attribute :division_champ, Shale::Type::Boolean

#division_leaderBoolean Also known as: division_leader?

Returns whether the team leads the division

Examples:

team_record.division_leader #=> true

Returns:

  • (Boolean)

    whether the team leads the division



229
# File 'lib/mlb/team_record.rb', line 229

attribute :division_leader, Shale::Type::Boolean

#division_rankString

Returns the division rank

Examples:

team_record.division_rank #=> "1"

Returns:

  • (String)

    the division rank



129
# File 'lib/mlb/team_record.rb', line 129

attribute :division_rank, Shale::Type::String

#games_backString

Returns games behind the division leader

Examples:

team_record.games_back #=> "3.0"

Returns:

  • (String)

    games behind the division leader



155
# File 'lib/mlb/team_record.rb', line 155

attribute :games_back, Shale::Type::String

#games_playedInteger

Returns the number of games played

Examples:

team_record.games_played #=> 162

Returns:

  • (Integer)

    the number of games played



147
# File 'lib/mlb/team_record.rb', line 147

attribute :games_played, Shale::Type::Integer

#league_rankString

Returns the league rank

Examples:

team_record.league_rank #=> "1"

Returns:

  • (String)

    the league rank



137
# File 'lib/mlb/team_record.rb', line 137

attribute :league_rank, Shale::Type::String

#league_recordLeagueRecord

Returns the league record

Examples:

team_record.league_record #=> #<MLB::LeagueRecord>

Returns:



165
# File 'lib/mlb/team_record.rb', line 165

attribute :league_record, LeagueRecord

#lossesInteger

Returns the number of losses

Examples:

team_record.losses #=> 68

Returns:

  • (Integer)

    the number of losses



181
# File 'lib/mlb/team_record.rb', line 181

attribute :losses, Shale::Type::Integer

#run_differentialInteger

Returns the run differential

Examples:

team_record.run_differential #=> 147

Returns:

  • (Integer)

    the run differential



205
# File 'lib/mlb/team_record.rb', line 205

attribute :run_differential, Shale::Type::Integer

#runs_allowedInteger

Returns the runs allowed

Examples:

team_record.runs_allowed #=> 668

Returns:

  • (Integer)

    the runs allowed



197
# File 'lib/mlb/team_record.rb', line 197

attribute :runs_allowed, Shale::Type::Integer

#runs_scoredInteger

Returns the runs scored

Examples:

team_record.runs_scored #=> 815

Returns:

  • (Integer)

    the runs scored



189
# File 'lib/mlb/team_record.rb', line 189

attribute :runs_scored, Shale::Type::Integer

#seasonString

Returns the season year

Examples:

team_record.season #=> "2024"

Returns:

  • (String)

    the season year



113
# File 'lib/mlb/team_record.rb', line 113

attribute :season, Shale::Type::String

#streakStreak

Returns the current streak

Examples:

team_record.streak #=> #<MLB::Streak>

Returns:

  • (Streak)

    the current streak



121
# File 'lib/mlb/team_record.rb', line 121

attribute :streak, Streak

#teamTeam

Returns the team

Examples:

team_record.team #=> #<MLB::Team>

Returns:

  • (Team)

    the team



105
# File 'lib/mlb/team_record.rb', line 105

attribute :team, Team

#winning_percentageString

Returns the winning percentage

Examples:

team_record.winning_percentage #=> ".580"

Returns:

  • (String)

    the winning percentage



213
# File 'lib/mlb/team_record.rb', line 213

attribute :winning_percentage, Shale::Type::String

#winsInteger

Returns the number of wins

Examples:

team_record.wins #=> 94

Returns:

  • (Integer)

    the number of wins



173
# File 'lib/mlb/team_record.rb', line 173

attribute :wins, Shale::Type::Integer