Class: CodebreakerGem::Failing
- Inherits:
-
OutputHelper
- Object
- OutputHelper
- CodebreakerGem::Failing
- Defined in:
- lib/app/helpers/failing.rb
Constant Summary collapse
- ERROR =
'error'
Instance Method Summary collapse
- #attempts_limit ⇒ Object
- #hints_limit ⇒ Object
- #player_name_length ⇒ Object
- #secret_code_digits_range ⇒ Object
- #secret_code_length ⇒ Object
- #unexpected_command ⇒ Object
- #unexpected_difficulty ⇒ Object
- #unexpected_option ⇒ Object
Methods inherited from OutputHelper
Instance Method Details
#attempts_limit ⇒ Object
11 12 13 |
# File 'lib/app/helpers/failing.rb', line 11 def attempts_limit error(:attempts_limit) end |
#hints_limit ⇒ Object
15 16 17 |
# File 'lib/app/helpers/failing.rb', line 15 def hints_limit error(:hints_limit) end |
#player_name_length ⇒ Object
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_range ⇒ Object
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_length ⇒ Object
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_command ⇒ Object
40 41 42 |
# File 'lib/app/helpers/failing.rb', line 40 def unexpected_command display(error(:unexpected_command)) end |
#unexpected_difficulty ⇒ Object
7 8 9 |
# File 'lib/app/helpers/failing.rb', line 7 def unexpected_difficulty error(:unexpected_difficulty) end |
#unexpected_option ⇒ Object
36 37 38 |
# File 'lib/app/helpers/failing.rb', line 36 def unexpected_option display(error(:unexpected_option)) end |