Class: Cliqr::Command::ShellRunner Private
- Inherits:
-
Object
- Object
- Cliqr::Command::ShellRunner
- Defined in:
- lib/cliqr/command/shell_command.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The runner for shell command
Instance Method Summary collapse
-
#initialize(base_command, context, prompt) ⇒ ShellRunner
constructor
private
Create the runner instance.
-
#run ⇒ Integer
private
Start shell.
Constructor Details
#initialize(base_command, context, prompt) ⇒ ShellRunner
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the runner instance
83 84 85 86 87 |
# File 'lib/cliqr/command/shell_command.rb', line 83 def initialize(base_command, context, prompt) @base_command = base_command @context = context @prompt = prompt end |
Instance Method Details
#run ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Start shell
92 93 94 95 96 97 98 99 |
# File 'lib/cliqr/command/shell_command.rb', line 92 def run loop do command = prompt execute(command) unless command == 'exit' break if command == 'exit' end 0 end |