Class: MLB::LeagueRecord

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

Overview

Represents a team’s league record (wins/losses)

Instance Attribute Summary collapse

Instance Attribute Details

#lossesInteger

Returns the number of losses

Examples:

league_record.losses #=> 68

Returns:

  • (Integer)

    the number of losses



22
# File 'lib/mlb/team_record.rb', line 22

attribute :losses, Shale::Type::Integer

#pctString

Returns the winning percentage

Examples:

league_record.pct #=> ".580"

Returns:

  • (String)

    the winning percentage



38
# File 'lib/mlb/team_record.rb', line 38

attribute :pct, Shale::Type::String

#tiesInteger

Returns the number of ties

Examples:

league_record.ties #=> 0

Returns:

  • (Integer)

    the number of ties



30
# File 'lib/mlb/team_record.rb', line 30

attribute :ties, Shale::Type::Integer

#winsInteger

Returns the number of wins

Examples:

league_record.wins #=> 94

Returns:

  • (Integer)

    the number of wins



14
# File 'lib/mlb/team_record.rb', line 14

attribute :wins, Shale::Type::Integer