Class: EhbrsRubyUtils::Bga::TableWhatsappFormatter::FormatPlayer

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_player.rb

Constant Summary collapse

FIELD_SEPARATOR =
' - '

Instance Method Summary collapse

Instance Method Details

#resultObject



14
15
16
# File 'lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_player.rb', line 14

def result
  %w[table_rank name score].map { |v| send(v) }.join(FIELD_SEPARATOR)
end

#scoreObject



24
25
26
# File 'lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_player.rb', line 24

def score
  "⭐ #{player.score}"
end

#table_rankObject



18
19
20
# File 'lib/ehbrs_ruby_utils/bga/table_whatsapp_formatter/format_player.rb', line 18

def table_rank
  "*#{player.rank}º*"
end