Class: MLB::Leader

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

Overview

Represents a league leader

Instance Attribute Summary collapse

Instance Attribute Details

#leagueLeague

Returns the league

Examples:

leader.league #=> #<MLB::League>

Returns:



51
# File 'lib/mlb/leader.rb', line 51

attribute :league, League

#personPlayer

Returns the player

Examples:

leader.person #=> #<MLB::Player>

Returns:



35
# File 'lib/mlb/leader.rb', line 35

attribute :person, Player

#rankInteger

Returns the leader rank

Examples:

leader.rank #=> 1

Returns:

  • (Integer)

    the rank



19
# File 'lib/mlb/leader.rb', line 19

attribute :rank, Shale::Type::Integer

#seasonString

Returns the season

Examples:

leader.season #=> "2024"

Returns:

  • (String)

    the season



67
# File 'lib/mlb/leader.rb', line 67

attribute :season, Shale::Type::String

#sportSport

Returns the sport

Examples:

leader.sport #=> #<MLB::Sport>

Returns:



59
# File 'lib/mlb/leader.rb', line 59

attribute :sport, Sport

#teamTeam

Returns the team

Examples:

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

Returns:

  • (Team)

    the team



43
# File 'lib/mlb/leader.rb', line 43

attribute :team, Team

#valueString

Returns the stat value

Examples:

leader.value #=> "58"

Returns:

  • (String)

    the value



27
# File 'lib/mlb/leader.rb', line 27

attribute :value, Shale::Type::String