Class: MLB::FreeAgent

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

Overview

Represents a free agent

Instance Attribute Summary collapse

Instance Attribute Details

#date_declaredDate

Returns the date the player declared free agency

Examples:

free_agent.date_declared #=> #<Date: 2024-10-31>

Returns:

  • (Date)

    the date declared



58
# File 'lib/mlb/free_agent.rb', line 58

attribute :date_declared, Shale::Type::Date

#date_signedDate

Returns the date the player signed

Examples:

free_agent.date_signed #=> #<Date: 2024-12-10>

Returns:

  • (Date)

    the date signed



50
# File 'lib/mlb/free_agent.rb', line 50

attribute :date_signed, Shale::Type::Date

#new_teamTeam

Returns the team the player signed with

Examples:

free_agent.new_team #=> #<MLB::Team>

Returns:

  • (Team)

    the new team



34
# File 'lib/mlb/free_agent.rb', line 34

attribute :new_team, Team

#notesString

Returns signing notes

Examples:

free_agent.notes #=> "Seven-Year Contract"

Returns:

  • (String)

    the notes



42
# File 'lib/mlb/free_agent.rb', line 42

attribute :notes, Shale::Type::String

#original_teamTeam

Returns the team the player left

Examples:

free_agent.original_team #=> #<MLB::Team>

Returns:

  • (Team)

    the original team



26
# File 'lib/mlb/free_agent.rb', line 26

attribute :original_team, Team

#playerPlayer

Returns the player

Examples:

free_agent.player #=> #<MLB::Player>

Returns:



18
# File 'lib/mlb/free_agent.rb', line 18

attribute :player, Player

#positionPosition

Returns the player’s position

Examples:

free_agent.position #=> #<MLB::Position>

Returns:



66
# File 'lib/mlb/free_agent.rb', line 66

attribute :position, Position