Class: Barometer::Query::Service::FromWeatherId
- Inherits:
-
Object
- Object
- Barometer::Query::Service::FromWeatherId
- Defined in:
- lib/barometer/query/services/from_weather_id.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(query) ⇒ FromWeatherId
constructor
A new instance of FromWeatherId.
Constructor Details
#initialize(query) ⇒ FromWeatherId
Returns a new instance of FromWeatherId.
7 8 9 |
# File 'lib/barometer/query/services/from_weather_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/from_weather_id.rb', line 11 def call converted_query = query.get_conversion(:weather_id) return unless converted_query @payload = YahooWeather::Api.new(converted_query).get parse_payload end |