Class: Codebreaker::Difficulty

Inherits:
Object
  • Object
show all
Defined in:
lib/codebreaker/difficulty.rb

Constant Summary collapse

NEGATIVE_INTEGER =
0

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attemptsObject (readonly)

Returns the value of attribute attempts.



5
6
7
# File 'lib/codebreaker/difficulty.rb', line 5

def attempts
  @attempts
end

#hintsObject (readonly)

Returns the value of attribute hints.



5
6
7
# File 'lib/codebreaker/difficulty.rb', line 5

def hints
  @hints
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/codebreaker/difficulty.rb', line 5

def name
  @name
end