Class: MLB::LinescoreTeam

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

Overview

Represents one team’s linescore totals

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsInteger

Returns total errors

Examples:

linescore_team.errors #=> 0

Returns:

  • (Integer)

    the errors



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

attribute :errors, Shale::Type::Integer

#hitsInteger

Returns total hits

Examples:

linescore_team.hits #=> 9

Returns:

  • (Integer)

    the hits



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

attribute :hits, Shale::Type::Integer

#is_winnerBoolean

Returns whether this team won

Examples:

linescore_team.winner? #=> true

Returns:

  • (Boolean)

    whether this team won



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

attribute :is_winner, Shale::Type::Boolean

#left_on_baseInteger

Returns total left on base

Examples:

linescore_team.left_on_base #=> 5

Returns:

  • (Integer)

    the left on base



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

attribute :left_on_base, Shale::Type::Integer

#runsInteger

Returns total runs

Examples:

linescore_team.runs #=> 8

Returns:

  • (Integer)

    the runs



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

attribute :runs, Shale::Type::Integer

Instance Method Details

#winner?Boolean

Returns whether this team won

Examples:

linescore_team.winner? #=> true

Returns:

  • (Boolean)

    whether this team won



53
54
55
# File 'lib/mlb/linescore_teams.rb', line 53

def winner?
  is_winner
end