Class: Graticule::Geocoder::Google::Response
- Inherits:
-
Object
- Object
- Graticule::Geocoder::Google::Response
- Defined in:
- lib/graticule/geocoder/google.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(json) ⇒ Response
constructor
A new instance of Response.
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
#results ⇒ Object (readonly)
Returns the value of attribute results.
91 92 93 |
# File 'lib/graticule/geocoder/google.rb', line 91 def results @results end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
91 92 93 |
# File 'lib/graticule/geocoder/google.rb', line 91 def status @status end |