Class: Statistic::StatisticRow
- Inherits:
-
Object
- Object
- Statistic::StatisticRow
- Defined in:
- lib/codebreaker/statistic/statistic_row.rb
Instance Attribute Summary collapse
-
#difficult_name ⇒ Object
Returns the value of attribute difficult_name.
-
#init_attempts_count ⇒ Object
Returns the value of attribute init_attempts_count.
-
#init_hints_count ⇒ Object
Returns the value of attribute init_hints_count.
-
#player_name ⇒ Object
Returns the value of attribute player_name.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#used_attempts_count ⇒ Object
Returns the value of attribute used_attempts_count.
-
#used_hints_count ⇒ Object
Returns the value of attribute used_hints_count.
Instance Method Summary collapse
-
#initialize(player:, difficult_init:) ⇒ StatisticRow
constructor
A new instance of StatisticRow.
Constructor Details
#initialize(player:, difficult_init:) ⇒ StatisticRow
Returns a new instance of StatisticRow.
7 8 9 10 11 12 13 14 15 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 7 def initialize(player:, difficult_init:) @rating = nil @player_name = player.name @difficult_name = difficult_init.name @init_attempts_count = difficult_init.attempts_count @init_hints_count = difficult_init.hint.hints_count @used_attempts_count = 0 @used_hints_count = 0 end |
Instance Attribute Details
#difficult_name ⇒ Object
Returns the value of attribute difficult_name.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def difficult_name @difficult_name end |
#init_attempts_count ⇒ Object
Returns the value of attribute init_attempts_count.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def init_attempts_count @init_attempts_count end |
#init_hints_count ⇒ Object
Returns the value of attribute init_hints_count.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def init_hints_count @init_hints_count end |
#player_name ⇒ Object
Returns the value of attribute player_name.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def player_name @player_name end |
#rating ⇒ Object
Returns the value of attribute rating.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def @rating end |
#used_attempts_count ⇒ Object
Returns the value of attribute used_attempts_count.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def used_attempts_count @used_attempts_count end |
#used_hints_count ⇒ Object
Returns the value of attribute used_hints_count.
3 4 5 |
# File 'lib/codebreaker/statistic/statistic_row.rb', line 3 def used_hints_count @used_hints_count end |