Class: Fog::SSH::Result
- Inherits:
-
Object
- Object
- Fog::SSH::Result
- Defined in:
- lib/fog/core/ssh.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#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
- #display_stderr ⇒ Object
- #display_stdout ⇒ Object
-
#initialize(command) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(command) ⇒ Result
Returns a new instance of Result.
127 128 129 130 131 |
# File 'lib/fog/core/ssh.rb', line 127 def initialize(command) @command = command @stderr = "" @stdout = "" end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
112 113 114 |
# File 'lib/fog/core/ssh.rb', line 112 def command @command end |
#status ⇒ Object
Returns the value of attribute status.
112 113 114 |
# File 'lib/fog/core/ssh.rb', line 112 def status @status end |
#stderr ⇒ Object
Returns the value of attribute stderr.
112 113 114 |
# File 'lib/fog/core/ssh.rb', line 112 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
112 113 114 |
# File 'lib/fog/core/ssh.rb', line 112 def stdout @stdout end |
Instance Method Details
#display_stderr ⇒ Object
123 124 125 |
# File 'lib/fog/core/ssh.rb', line 123 def display_stderr Fog::Formatador.display_line(stderr.split("\r\n")) end |
#display_stdout ⇒ Object
114 115 116 117 118 119 120 121 |
# File 'lib/fog/core/ssh.rb', line 114 def display_stdout data = stdout.split("\r\n") if data.is_a?(String) Fog::Formatador.display_line(data) elsif data.is_a?(Array) Fog::Formatador.display_lines(data) end end |