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

#league ⇒ League

Returns the league

Examples:

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

Returns:



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

attribute :league, League

#person ⇒ Player

Returns the player

Examples:

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

Returns:



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

attribute :person, Player

#rank ⇒ Integer

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

#season ⇒ String

Returns the season

Examples:

leader.season #=> "2024"

Returns:

  • (String) —

    the season



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

attribute :season, Shale::Type::String

#sport ⇒ Sport

Returns the sport

Examples:

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

Returns:



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

attribute :sport, Sport

#team ⇒ Team

Returns the team

Examples:

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

Returns:

  • (Team) —

    the team



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

attribute :team, Team

#value ⇒ String

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