Class: Stattleship::BasketballTeamGameLog

Inherits:
TeamGameLog
  • Object
show all
Defined in:
lib/stattleship/basketball_team_game_logs.rb

Instance Method Summary collapse

Methods inherited from TeamGameLog

#city, #league_abbreviation, #league_name, #opponent_full_name, #opponent_name, #scoreline, #team_full_name, #team_name, #venue

Instance Method Details

#statsObject


3
4
5
6
7
8
9
10
11
12
# 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_sentenceObject


14
15
16
# File 'lib/stattleship/basketball_team_game_logs.rb', line 14

def to_sentence
  "#{team_name} #{stats.join(', ')} (#{game.name})"
end