class Stattleship::BaseballTeamGameLog

Public Instance Methods

stats() click to toggle source
# File lib/stattleship/baseball_team_game_logs.rb, line 3
def stats
  [
    "#{hits.to_i} H",
    "#{runs.to_i} R",
    "#{runs_batted_in.to_i} RBI",
    "#{errors_made} E"
  ]
end
to_sentence() click to toggle source
# File lib/stattleship/baseball_team_game_logs.rb, line 12
def to_sentence
  "#{team_name} #{stats.join(', ')} (#{game.name})"
end