Class: Stattleship::HockeyTeamGameLog
- Inherits:
-
TeamGameLog
- Object
- OpenStruct
- TeamGameLog
- Stattleship::HockeyTeamGameLog
- Defined in:
- lib/stattleship/hockey_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
#stats ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/stattleship/hockey_team_game_logs.rb', line 3 def stats [ "#{StatFormatter.format(value: goals)} G", "#{StatFormatter.format(value: penalty_minutes)} PIM", "#{StatFormatter.format(value: player_points)} P", "#{StatFormatter.format(value: shots)} S" ] end |
#to_sentence ⇒ Object
12 13 14 |
# File 'lib/stattleship/hockey_team_game_logs.rb', line 12 def to_sentence "#{team_name} #{stats.join(', ')} (#{game.name})" end |