Class: MLB::TeamStat

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

Overview

Represents a team stat split

Instance Attribute Summary collapse

Instance Attribute Details

#rank ⇒ Integer

Returns the rank in the stat leaderboard

Examples:

team_stat.rank #=> 1

Returns:

  • (Integer) —

    the rank



41
# File 'lib/mlb/team_stat.rb', line 41

attribute :rank, Shale::Type::Integer

#season ⇒ String

Returns the season for this stat split

Examples:

team_stat.season #=> "2024"

Returns:

  • (String) —

    the season



17
# File 'lib/mlb/team_stat.rb', line 17

attribute :season, Shale::Type::String

#stat ⇒ StatValues

Returns the stat values

Examples:

team_stat.stat.runs #=> 829

Returns:



25
# File 'lib/mlb/team_stat.rb', line 25

attribute :stat, StatValues

#team ⇒ Team

Returns the team

Examples:

team_stat.team.name #=> "New York Yankees"

Returns:

  • (Team) —

    the team



33
# File 'lib/mlb/team_stat.rb', line 33

attribute :team, Team