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