Class: Barometer::Query::Service::ToWoeId
- Inherits:
-
Object
- Object
- Barometer::Query::Service::ToWoeId
- Defined in:
- lib/barometer/query/services/to_woe_id.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(query) ⇒ ToWoeId
constructor
A new instance of ToWoeId.
Constructor Details
#initialize(query) ⇒ ToWoeId
Returns a new instance of ToWoeId.
7 8 9 |
# File 'lib/barometer/query/services/to_woe_id.rb', line 7 def initialize(query) @query = query end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/barometer/query/services/to_woe_id.rb', line 11 def call converted_query = query.get_conversion(:short_zipcode, :zipcode, :geocode, :unknown, :coordinates, :postalcode, :ipv4_address) return unless converted_query @payload = YahooPlacefinder::Api.new(converted_query).get parse_payload end |