Class: Ridley::HostConnector::Response
- Inherits:
-
Object
- Object
- Ridley::HostConnector::Response
- Defined in:
- lib/ridley/host_connector/response.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
Returns the value of attribute exit_code.
-
#exit_signal ⇒ Object
Returns the value of attribute exit_signal.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#error? ⇒ Boolean
Return true if the response was not successful.
-
#initialize(host, options = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(host, options = {}) ⇒ Response
Returns a new instance of Response.
11 12 13 14 15 16 17 |
# File 'lib/ridley/host_connector/response.rb', line 11 def initialize(host, = {}) @host = host @stdout = [:stdout] || String.new @stderr = [:stderr] || String.new @exit_code = [:exit_code] || -1 @exit_signal = [:exit_signal] || nil end |
Instance Attribute Details
#exit_code ⇒ Object
Returns the value of attribute exit_code.
8 9 10 |
# File 'lib/ridley/host_connector/response.rb', line 8 def exit_code @exit_code end |
#exit_signal ⇒ Object
Returns the value of attribute exit_signal.
9 10 11 |
# File 'lib/ridley/host_connector/response.rb', line 9 def exit_signal @exit_signal end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/ridley/host_connector/response.rb', line 4 def host @host end |
#stderr ⇒ Object
Returns the value of attribute stderr.
7 8 9 |
# File 'lib/ridley/host_connector/response.rb', line 7 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
6 7 8 |
# File 'lib/ridley/host_connector/response.rb', line 6 def stdout @stdout end |
Instance Method Details
#error? ⇒ Boolean
Return true if the response was not successful
22 23 24 |
# File 'lib/ridley/host_connector/response.rb', line 22 def error? self.exit_code != 0 end |