Class: MapQuest::Services::Geocoding::Response
- Defined in:
- lib/mapquest/services/geocoding.rb
Instance Attribute Summary
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(response_string, params = {}) ⇒ Response
constructor
A new instance of Response.
- #locations ⇒ Object
- #providedLocation ⇒ Object
Methods inherited from Response
#copyright, #info, #options, #status, #valid_request?
Constructor Details
#initialize(response_string, params = {}) ⇒ Response
Returns a new instance of Response.
44 45 46 |
# File 'lib/mapquest/services/geocoding.rb', line 44 def initialize(response_string, params = {}) super end |
Instance Method Details
#locations ⇒ Object
48 49 50 51 52 |
# File 'lib/mapquest/services/geocoding.rb', line 48 def locations if valid response[:results].first[:locations] end end |
#providedLocation ⇒ Object
54 55 56 57 58 |
# File 'lib/mapquest/services/geocoding.rb', line 54 def providedLocation if valid response[:results].first[:providedLocation] end end |