class StatsCloud::ParsedResponseHelper
This helper works to parse response from the server to convenient object.
Attributes
body[R]
RestClient json-parsed response body.
Type: Hash
code[R]
RestClient response code.
Type: Integer
Public Class Methods
new(response)
click to toggle source
Creates new helper object with parsed response body as json.
@param [RestClient::Response
] response
response from the cluster.
# File lib/statscloud/helpers/cluster_client/parsed_response_helper.rb, line 23 def initialize(response) @code = response&.code @body = parse_json(response.body, nil) end