class Stattleship::BasketballTeamGameLog

Public Instance Methods

stats() click to toggle source
# File lib/stattleship/basketball_team_game_logs.rb, line 3
def stats
  [
    "#{field_goals_made.to_i} FGM",
    "#{(field_goals_percentage.to_f * 100).round(1)} FG%",
    "#{points_scored_total.to_i} PTS",
    "#{rebounds_defensive.to_i} DRB",
    "#{rebounds_offensive.to_i} ORB",
    "#{rebounds_total} REB"
  ]
end
to_sentence() click to toggle source
# File lib/stattleship/basketball_team_game_logs.rb, line 14
def to_sentence
  "#{team_name} #{stats.join(', ')} (#{game.name})"
end