Class: Shellout::CommandLoop
- Inherits:
-
Object
- Object
- Shellout::CommandLoop
- Defined in:
- lib/shellout/command_loop.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(menu) ⇒ CommandLoop
constructor
A new instance of CommandLoop.
Constructor Details
#initialize(menu) ⇒ CommandLoop
Returns a new instance of CommandLoop.
5 6 7 |
# File 'lib/shellout/command_loop.rb', line 5 def initialize() = end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shellout/command_loop.rb', line 9 def call loop do begin task = .call task.call rescue Interrupt # ^C puts # Add a new line in case we are prompting end end end |