Class: CodebreakerGem::Console
- Inherits:
-
Object
- Object
- CodebreakerGem::Console
- Includes:
- ConsoleUserInteraction
- Defined in:
- lib/app/entities/console.rb
Constant Summary collapse
- COMMANDS =
{ start: 'start', rules: 'rules', stats: 'stats', exit: 'exit' }.freeze
- KEYWORDS =
{ yes: 'yes', no: 'no' }.freeze
Constants included from ConsoleUserInteraction
CodebreakerGem::ConsoleUserInteraction::ENTITIES
Instance Method Summary collapse
Methods included from ConsoleUserInteraction
#create_entity, #exit_from_console, #failing, #options_list, #output, #statistic, #user_input
Instance Method Details
#menu ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/app/entities/console.rb', line 19 def output.introduction loop do output.display() select_option end end |
#select_option ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/app/entities/console.rb', line 27 def select_option case user_input when COMMANDS[:start] then when COMMANDS[:rules] then output.rules when COMMANDS[:stats] then output.display(statistic.) else failing.unexpected_option end end |