Class: CodebreakerVk::TableData
- Inherits:
-
Object
- Object
- CodebreakerVk::TableData
- Defined in:
- lib/codebreaker_vk/table_data.rb
Instance Attribute Summary collapse
-
#attempts_total ⇒ Object
Returns the value of attribute attempts_total.
-
#attempts_used ⇒ Object
Returns the value of attribute attempts_used.
-
#difficulty ⇒ Object
Returns the value of attribute difficulty.
-
#hints_total ⇒ Object
Returns the value of attribute hints_total.
-
#hints_used ⇒ Object
Returns the value of attribute hints_used.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, difficulty:, attempts_total:, attempts_used:, hints_total:, hints_used:) ⇒ TableData
constructor
A new instance of TableData.
- #to_s ⇒ Object
Constructor Details
#initialize(name:, difficulty:, attempts_total:, attempts_used:, hints_total:, hints_used:) ⇒ TableData
Returns a new instance of TableData.
7 8 9 10 11 12 13 14 |
# 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 |
Instance Attribute Details
#attempts_total ⇒ Object
Returns the value of attribute attempts_total.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def attempts_total @attempts_total end |
#attempts_used ⇒ Object
Returns the value of attribute attempts_used.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def attempts_used @attempts_used end |
#difficulty ⇒ Object
Returns the value of attribute difficulty.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def difficulty @difficulty end |
#hints_total ⇒ Object
Returns the value of attribute hints_total.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def hints_total @hints_total end |
#hints_used ⇒ Object
Returns the value of attribute hints_used.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def hints_used @hints_used end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/codebreaker_vk/table_data.rb', line 5 def name @name end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 |
# 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 |