Class: Codebreaker::Console
- Inherits:
-
ValidatableEntity
- Object
- ValidatableEntity
- Codebreaker::Console
- Includes:
- Uploader
- Defined in:
- lib/app/entities/console.rb
Constant Summary collapse
- ACCEPT_SAVING_RESULT =
'yes'- COMMANDS =
{ rules: 'rules', start: 'start', stats: 'stats', exit: 'exit' }.freeze
Constants included from Uploader
Uploader::PATH, Uploader::PATH_FOLDER, Uploader::PATH_FORMAT, Uploader::PATH_NAME
Instance Method Summary collapse
Methods included from Uploader
Methods inherited from ValidatableEntity
#initialize, #valid?, #validate
Methods included from Validator
#check_cover?, #check_include?, #check_numbers?, #check_size?
Constructor Details
This class inherits a constructor from Codebreaker::ValidatableEntity
Instance Method Details
#greeting ⇒ Object
13 14 15 |
# File 'lib/app/entities/console.rb', line 13 def greeting Representer.greeting_msg end |
#main_menu ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/app/entities/console.rb', line 17 def loop do Representer.what_next_text case make_valid_input_for_class(Navigator).input when COMMANDS[:start] then return registration when COMMANDS[:rules] then Representer.show_rules when COMMANDS[:stats] then statistics end end end |