Class: CityGrid::API::Response

Inherits:
CityGrid::Abstraction::SuperHash show all
Defined in:
lib/citygrid/api/response.rb

Overview

Creates SuperHash from parsed_response Stores response object in @response. ———————————— #

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from CityGrid::Abstraction::SuperHash

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CityGrid::Abstraction::SuperHash

Instance Attribute Details

#httpartyObject (readonly)

Returns the value of attribute httparty.



7
8
9
# File 'lib/citygrid/api/response.rb', line 7

def httparty
  @httparty
end

Class Method Details

.new(httparty_response) ⇒ Object



9
10
11
12
13
# File 'lib/citygrid/api/response.rb', line 9

def self.new httparty_response
  resp = super httparty_response.parsed_response
  resp.instance_variable_set "@httparty", httparty_response
  resp
end