Class: RubySSH::Result
- Inherits:
-
Object
- Object
- RubySSH::Result
- Defined in:
- lib/ruby-ssh/result.rb
Instance Attribute Summary collapse
-
#exit_status ⇒ Object
readonly
Returns the value of attribute exit_status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(args = {}) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 |
# File 'lib/ruby-ssh/result.rb', line 5 def initialize(args = {}) @stdout = args[:stdout] @stderr = args[:stderr] @exit_status = args[:exit_status] end |
Instance Attribute Details
#exit_status ⇒ Object (readonly)
Returns the value of attribute exit_status.
3 4 5 |
# File 'lib/ruby-ssh/result.rb', line 3 def exit_status @exit_status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
3 4 5 |
# File 'lib/ruby-ssh/result.rb', line 3 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
3 4 5 |
# File 'lib/ruby-ssh/result.rb', line 3 def stdout @stdout end |
Instance Method Details
#success? ⇒ Boolean
11 12 13 |
# File 'lib/ruby-ssh/result.rb', line 11 def success? @exit_status == 0 end |