Class: MLB::BoxscoreBattingStats

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

Overview

Represents batting statistics for a team in a boxscore

Instance Attribute Summary collapse

Instance Attribute Details

#at_bats ⇒ Integer

Returns the at-bats

Examples:

stats.at_bats #=> 36

Returns:

  • (Integer) —

    the at-bats



68
# File 'lib/mlb/boxscore_team_stats.rb', line 68

attribute :at_bats, Shale::Type::Integer

#avg ⇒ String

Returns the batting average

Examples:

stats.avg #=> ".227"

Returns:

  • (String) —

    the batting average



76
# File 'lib/mlb/boxscore_team_stats.rb', line 76

attribute :avg, Shale::Type::String

#base_on_balls ⇒ Integer

Returns the walks

Examples:

stats.base_on_balls #=> 3

Returns:

  • (Integer) —

    the walks



60
# File 'lib/mlb/boxscore_team_stats.rb', line 60

attribute :base_on_balls, Shale::Type::Integer

#doubles ⇒ Integer

Returns the doubles

Examples:

stats.doubles #=> 2

Returns:

  • (Integer) —

    the doubles



28
# File 'lib/mlb/boxscore_team_stats.rb', line 28

attribute :doubles, Shale::Type::Integer

#hits ⇒ Integer

Returns the hits

Examples:

stats.hits #=> 9

Returns:

  • (Integer) —

    the hits



20
# File 'lib/mlb/boxscore_team_stats.rb', line 20

attribute :hits, Shale::Type::Integer

#home_runs ⇒ Integer

Returns the home runs

Examples:

stats.home_runs #=> 3

Returns:

  • (Integer) —

    the home runs



44
# File 'lib/mlb/boxscore_team_stats.rb', line 44

attribute :home_runs, Shale::Type::Integer

#left_on_base ⇒ Integer

Returns runners left on base

Examples:

stats.left_on_base #=> 11

Returns:

  • (Integer) —

    the left on base



92
# File 'lib/mlb/boxscore_team_stats.rb', line 92

attribute :left_on_base, Shale::Type::Integer

#rbi ⇒ Integer

Returns the runs batted in

Examples:

stats.rbi #=> 8

Returns:

  • (Integer) —

    the RBI



84
# File 'lib/mlb/boxscore_team_stats.rb', line 84

attribute :rbi, Shale::Type::Integer

#runs ⇒ Integer

Returns the runs scored

Examples:

stats.runs #=> 8

Returns:

  • (Integer) —

    the runs



12
# File 'lib/mlb/boxscore_team_stats.rb', line 12

attribute :runs, Shale::Type::Integer

#strike_outs ⇒ Integer

Returns the strikeouts

Examples:

stats.strike_outs #=> 10

Returns:

  • (Integer) —

    the strikeouts



52
# File 'lib/mlb/boxscore_team_stats.rb', line 52

attribute :strike_outs, Shale::Type::Integer

#triples ⇒ Integer

Returns the triples

Examples:

stats.triples #=> 1

Returns:

  • (Integer) —

    the triples



36
# File 'lib/mlb/boxscore_team_stats.rb', line 36

attribute :triples, Shale::Type::Integer