Class: Rancher::Shell::ApiResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/rancher/shell/api_response.rb

Instance Method Summary collapse

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

#bodyObject



10
11
12
# File 'lib/rancher/shell/api_response.rb', line 10

def body
  @http_response.body
end

#jsonObject



14
15
16
# File 'lib/rancher/shell/api_response.rb', line 14

def json
  JSON.parse body
end