Class: Codebreaker::Difficulty
- Inherits:
-
Object
- Object
- Codebreaker::Difficulty
- Defined in:
- lib/codebreaker/difficulty.rb
Constant Summary collapse
- NEGATIVE_INTEGER =
0
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#hints ⇒ Object
readonly
Returns the value of attribute hints.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, attempts:, hints:) ⇒ Difficulty
constructor
A new instance of Difficulty.
Constructor Details
#initialize(name:, attempts:, hints:) ⇒ Difficulty
Returns a new instance of Difficulty.
9 10 11 12 13 |
# File 'lib/codebreaker/difficulty.rb', line 9 def initialize(name:, attempts:, hints:) @name = name @attempts = attempts @hints = hints end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
5 6 7 |
# File 'lib/codebreaker/difficulty.rb', line 5 def attempts @attempts end |
#hints ⇒ Object (readonly)
Returns the value of attribute hints.
5 6 7 |
# File 'lib/codebreaker/difficulty.rb', line 5 def hints @hints end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/codebreaker/difficulty.rb', line 5 def name @name end |