class Stattleship::BasketballGameLog

Public Instance Methods

stats() click to toggle source
# File lib/stattleship/basketball_game_logs.rb, line 3
def stats
  [
    "#{field_goals_made.to_i} FGM",
    "#{(field_goals_pct.to_f * 100).round(1)} FG%",
    "#{points.to_i} PTS",
    "#{rebounds_total.to_i} RBD",
    "#{assists.to_i} A",
    "#{steals.to_i} STL",
    "#{blocks.to_i} BLK"
  ]
end
to_sentence() click to toggle source
# File lib/stattleship/basketball_game_logs.rb, line 15
def to_sentence
  "#{player_name} #{stats.join(', ')} (#{game.name})"
end