class CodebreakerVk::TableData

Attributes

attempts_total[RW]
attempts_used[RW]
difficulty[RW]
hints_total[RW]
hints_used[RW]
name[RW]

Public Class Methods

new(name:, difficulty:, attempts_total:, attempts_used:, hints_total:, hints_used:) click to toggle source
# File lib/codebreaker_vk/table_data.rb, line 7
def initialize(name:, difficulty:, attempts_total:, attempts_used:, hints_total:, hints_used:)
  @name = name
  @difficulty = difficulty
  @attempts_total = attempts_total
  @attempts_used = attempts_used
  @hints_total = hints_total
  @hints_used = hints_used
end

Public Instance Methods

to_s() click to toggle source
# File lib/codebreaker_vk/table_data.rb, line 16
def to_s
  I18n.t(:stats,
         name: @name,
         difficulty: @difficulty,
         attempts_total: @attempts_total,
         attempts_used: @attempts_used,
         hints_total: @hints_total,
         hints_used: @hints_used)
end