class Stattleship::Leader
Public Instance Methods
format_stat(value)
click to toggle source
# File lib/stattleship/stat_leaders.rb, line 13 def format_stat(value) StatFormatter.stat(stat_name: stat_name, value: stat) end
lowercase_stat()
click to toggle source
# File lib/stattleship/stat_leaders.rb, line 17 def lowercase_stat if humanized_stat humanized_stat.downcase end end
player_name()
click to toggle source
# File lib/stattleship/stat_leaders.rb, line 3 def player_name if player player.name end end
to_sentence()
click to toggle source
# File lib/stattleship/stat_leaders.rb, line 9 def to_sentence "#{player.name} is in #{place.ordinalize} place with #{format_stat(stat)} #{lowercase_stat}" end