Class: Rancher::Shell::ApiResponse
- Inherits:
-
Object
- Object
- Rancher::Shell::ApiResponse
- Defined in:
- lib/rancher/shell/api_response.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(http_response) ⇒ ApiResponse
constructor
A new instance of ApiResponse.
- #json ⇒ Object
Constructor Details
#initialize(http_response) ⇒ ApiResponse
Returns a new instance of ApiResponse.
6 7 8 |
# File 'lib/rancher/shell/api_response.rb', line 6 def initialize http_response @http_response = http_response end |
Instance Method Details
#body ⇒ Object
10 11 12 |
# File 'lib/rancher/shell/api_response.rb', line 10 def body @http_response.body end |
#json ⇒ Object
14 15 16 |
# File 'lib/rancher/shell/api_response.rb', line 14 def json JSON.parse body end |