Class: Conjure::Service::RemoteShell::Result
- Inherits:
-
Object
- Object
- Conjure::Service::RemoteShell::Result
- Defined in:
- lib/conjure/service/remote_shell.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
Returns the value of attribute status.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(channel) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(channel) ⇒ Result
Returns a new instance of Result.
60 61 62 63 64 65 66 67 68 |
# File 'lib/conjure/service/remote_shell.rb', line 60 def initialize(channel) @stdout, @stderr = "", "" channel.on_data do |c, data| yield data if block_given? @stdout << data end channel.on_extended_data { |c, type, data| @stderr << data } channel.on_request("exit-status") { |c, data| @status = data.read_long } end |
Instance Attribute Details
#status ⇒ Object
Returns the value of attribute status.
59 60 61 |
# File 'lib/conjure/service/remote_shell.rb', line 59 def status @status end |
#stderr ⇒ Object
Returns the value of attribute stderr.
59 60 61 |
# File 'lib/conjure/service/remote_shell.rb', line 59 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
59 60 61 |
# File 'lib/conjure/service/remote_shell.rb', line 59 def stdout @stdout end |