Class: Graticule::Geocoder::Google::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/graticule/geocoder/google.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Response

Returns a new instance of Response.


92
93
94
95
96
# File 'lib/graticule/geocoder/google.rb', line 92

def initialize(json)
  result = JSON.parse(json)
  @results = result["results"].collect{|attribs| Result.new(attribs)}
  @status = result["status"]
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results


91
92
93
# File 'lib/graticule/geocoder/google.rb', line 91

def results
  @results
end

#statusObject (readonly)

Returns the value of attribute status


91
92
93
# File 'lib/graticule/geocoder/google.rb', line 91

def status
  @status
end