Class: Stattleship::HockeyPenalty
Instance Method Summary
collapse
#at, #away_team, #away_team_name, #city, #home_team, #home_team_name, #league_abbreviation, #league_name, #opponent_full_name, #opponent_name, #period, #period_abbreviation, #period_time, #player_name, #scoreline, #subject_name, #team_full_name, #team_name, #venue, #venue_name, #vs, #winning_team, #winning_team_name
Instance Method Details
#stats ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/stattleship/hockey_penalties.rb', line 3
def stats
[
"#{goals.to_i} G",
"#{assists.to_i} A",
"#{points.to_i} P",
"#{shots.to_i} S",
"#{hits.to_i} H",
"#{goals_power_play.to_i} PPG"
]
end
|
#to_sentence ⇒ Object
14
15
16
|
# File 'lib/stattleship/hockey_penalties.rb', line 14
def to_sentence
"#{player_name} #{stats.join(', ')} (#{game.name})"
end
|