Class: ChefMetal::Transport::SSH::SSHResult
- Inherits:
-
Object
- Object
- ChefMetal::Transport::SSH::SSHResult
- Defined in:
- lib/chef_metal/transport/ssh.rb
Instance Attribute Summary collapse
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #error! ⇒ Object
-
#initialize(stdout, stderr, exitstatus) ⇒ SSHResult
constructor
A new instance of SSHResult.
Constructor Details
#initialize(stdout, stderr, exitstatus) ⇒ SSHResult
Returns a new instance of SSHResult.
149 150 151 152 153 |
# File 'lib/chef_metal/transport/ssh.rb', line 149 def initialize(stdout, stderr, exitstatus) @stdout = stdout @stderr = stderr @exitstatus = exitstatus end |
Instance Attribute Details
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
157 158 159 |
# File 'lib/chef_metal/transport/ssh.rb', line 157 def exitstatus @exitstatus end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
156 157 158 |
# File 'lib/chef_metal/transport/ssh.rb', line 156 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
155 156 157 |
# File 'lib/chef_metal/transport/ssh.rb', line 155 def stdout @stdout end |
Instance Method Details
#error! ⇒ Object
159 160 161 |
# File 'lib/chef_metal/transport/ssh.rb', line 159 def error! raise "Error: code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0 end |