Class: MLB::TeamLeader

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

Overview

Represents a team leader entry

Instance Attribute Summary collapse

Instance Attribute Details

#person ⇒ Player

Returns the player

Examples:

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

Returns:



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

attribute :person, Player

#rank ⇒ Integer

Returns the leader's rank

Examples:

leader.rank #=> 1

Returns:

  • (Integer) —

    the rank



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

attribute :rank, Shale::Type::Integer

#season ⇒ String

Returns the season

Examples:

leader.season #=> "2024"

Returns:

  • (String) —

    the season



49
# File 'lib/mlb/team_leader.rb', line 49

attribute :season, Shale::Type::String

#team ⇒ Team

Returns the team

Examples:

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

Returns:

  • (Team) —

    the team



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

attribute :team, Team

#value ⇒ String

Returns the stat value

Examples:

leader.value #=> "58"

Returns:

  • (String) —

    the stat value



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

attribute :value, Shale::Type::String