Class: EC2::Common::Curl::Result
- Inherits:
-
Object
- Object
- EC2::Common::Curl::Result
- Defined in:
- lib/ec2/common/curl.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(stdout, stderr, status, response = nil) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(stdout, stderr, status, response = nil) ⇒ Result
Returns a new instance of Result.
51 52 53 54 55 56 57 58 59 |
# File 'lib/ec2/common/curl.rb', line 51 def initialize(stdout, stderr, status, response = nil) unless response.nil? or response.is_a? EC2::Common::Curl::Response raise ArgumentError.new('invalid response argument') end @stdout = stdout @stderr = stderr @status = status @response= response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
50 51 52 |
# File 'lib/ec2/common/curl.rb', line 50 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
50 51 52 |
# File 'lib/ec2/common/curl.rb', line 50 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
50 51 52 |
# File 'lib/ec2/common/curl.rb', line 50 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
50 51 52 |
# File 'lib/ec2/common/curl.rb', line 50 def stdout @stdout end |
Instance Method Details
#success? ⇒ Boolean
60 61 62 |
# File 'lib/ec2/common/curl.rb', line 60 def success? @status == 0 end |