Class: CodebreakerGem::Failing

Inherits:
OutputHelper show all
Defined in:
lib/app/helpers/failing.rb

Constant Summary collapse

ERROR =
'error'

Instance Method Summary collapse

Methods inherited from OutputHelper

#display, #get

Instance Method Details

#attempts_limitObject



11
12
13
# File 'lib/app/helpers/failing.rb', line 11

def attempts_limit
  error(:attempts_limit)
end

#hints_limitObject



15
16
17
# File 'lib/app/helpers/failing.rb', line 15

def hints_limit
  error(:hints_limit)
end

#player_name_lengthObject



19
20
21
22
23
# File 'lib/app/helpers/failing.rb', line 19

def player_name_length
  error(:player_name_length,
        min_length: Player::NAME_LENGTH_RANGE.min,
        max_length: Player::NAME_LENGTH_RANGE.max)
end

#secret_code_digits_rangeObject



30
31
32
33
34
# File 'lib/app/helpers/failing.rb', line 30

def secret_code_digits_range
  error(:secret_code_digits_range,
        min_value: Guess::ELEMENT_VALUE_RANGE.min,
        max_value: Guess::ELEMENT_VALUE_RANGE.max)
end

#secret_code_lengthObject



25
26
27
28
# File 'lib/app/helpers/failing.rb', line 25

def secret_code_length
  error(:secret_code_length,
        code_length: Game::SECRET_CODE_LENGTH)
end

#unexpected_commandObject



40
41
42
# File 'lib/app/helpers/failing.rb', line 40

def unexpected_command
  display(error(:unexpected_command))
end

#unexpected_difficultyObject



7
8
9
# File 'lib/app/helpers/failing.rb', line 7

def unexpected_difficulty
  error(:unexpected_difficulty)
end

#unexpected_optionObject



36
37
38
# File 'lib/app/helpers/failing.rb', line 36

def unexpected_option
  display(error(:unexpected_option))
end