Class: Bosh::Core::Shell
- Inherits:
-
Object
- Object
- Bosh::Core::Shell
- Defined in:
- lib/bosh/core/shell.rb
Instance Method Summary collapse
-
#initialize(stdout = $stdout) ⇒ Shell
constructor
A new instance of Shell.
- #run(command, options = {}) ⇒ Object
Constructor Details
#initialize(stdout = $stdout) ⇒ Shell
Returns a new instance of Shell.
3 4 5 |
# File 'lib/bosh/core/shell.rb', line 3 def initialize(stdout = $stdout) @stdout = stdout end |
Instance Method Details
#run(command, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/bosh/core/shell.rb', line 7 def run(command, = {}) output_lines = run_command(command, ) output_lines = tail(output_lines, ) command_output = output_lines.join("\n") report(command, command_output, ) command_output end |