Class: MLB::LeaderCategory

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

Overview

Represents a leader category result

Instance Attribute Summary collapse

Instance Attribute Details

#leader_categoryString

Returns the category name

Examples:

category.leader_category #=> "homeRuns"

Returns:

  • (String)

    the category



13
# File 'lib/mlb/leaders.rb', line 13

attribute :leader_category, Shale::Type::String

#leadersArray<Leader>

Returns the leaders

Examples:

category.leaders #=> [#<MLB::Leader>, ...]

Returns:

  • (Array<Leader>)

    the leaders



29
# File 'lib/mlb/leaders.rb', line 29

attribute :leaders, Leader, collection: true

#seasonString

Returns the season

Examples:

category.season #=> "2024"

Returns:

  • (String)

    the season



21
# File 'lib/mlb/leaders.rb', line 21

attribute :season, Shale::Type::String