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.
143 144 145 146 147 |
# File 'lib/vra/http.rb', line 143 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.
140 141 142 |
# File 'lib/vra/http.rb', line 140 def http_code @http_code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
141 142 143 |
# File 'lib/vra/http.rb', line 141 def response @response end |
Class Method Details
.from_response(http_response) ⇒ Object
136 137 138 |
# File 'lib/vra/http.rb', line 136 def self.from_response(http_response) new(http_response., http_response.code, http_response.body) end |