Exception: Vra::Http::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Vra::Http::Error
- Defined in:
- lib/vra/http.rb
Instance Attribute Summary collapse
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, http_code, response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, http_code, response) ⇒ Error
Returns a new instance of Error.
135 136 137 138 139 |
# File 'lib/vra/http.rb', line 135 def initialize(, http_code, response) super() @http_code = http_code @response = response end |
Instance Attribute Details
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
132 133 134 |
# File 'lib/vra/http.rb', line 132 def http_code @http_code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
133 134 135 |
# File 'lib/vra/http.rb', line 133 def response @response end |
Class Method Details
.from_response(http_response) ⇒ Object
128 129 130 |
# File 'lib/vra/http.rb', line 128 def self.from_response(http_response) new(http_response., http_response.code, http_response.body) end |