Class: MLB::DraftYear

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

Overview

Represents a draft year

Instance Attribute Summary collapse

Instance Attribute Details

#draft_yearInteger

Returns the draft year

Examples:

draft.draft_year #=> 2024

Returns:

  • (Integer)

    the year



37
# File 'lib/mlb/draft.rb', line 37

attribute :draft_year, Shale::Type::Integer

#roundsArray<DraftRound>

Returns the draft rounds

Examples:

draft.rounds #=> [#<MLB::DraftRound>, ...]

Returns:



45
# File 'lib/mlb/draft.rb', line 45

attribute :rounds, DraftRound, collection: true