Class: Codebreaker::Difficulty

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, attempts:, hints:, level:) ⇒ Difficulty

Returns a new instance of Difficulty.



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

def initialize(name:, attempts:, hints:, level:)
  @name = name
  @attempts = attempts
  @hints = hints
  @level = level
end

Instance Attribute Details

#attemptsObject (readonly)

Returns the value of attribute attempts.



3
4
5
# File 'lib/codebreaker/difficulty.rb', line 3

def attempts
  @attempts
end

#hintsObject (readonly)

Returns the value of attribute hints.



3
4
5
# File 'lib/codebreaker/difficulty.rb', line 3

def hints
  @hints
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/codebreaker/difficulty.rb', line 3

def name
  @name
end