Class: Escape::CLI
- Inherits:
-
Thor
- Object
- Thor
- Escape::CLI
- Defined in:
- lib/escape/cli.rb
Instance Method Summary collapse
Instance Method Details
#restart ⇒ Object
17 18 19 20 |
# File 'lib/escape/cli.rb', line 17 def restart Escape::Commands::Questions.new(self).start(configuration.questions, configuration.clues) Escape::Commands::Restart.new(self).restart_or_quit end |
#start ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/escape/cli.rb', line 8 def start raise RuntimeError, "Number of questions does not match the number of clues" unless valid_configuration? Escape::Commands::Welcome.new(self).show(configuration.) Escape::Commands::Questions.new(self).start(configuration.questions, configuration.clues) Escape::Commands::Restart.new(self).restart_or_quit end |