Class: OpenWeatherAPI::Resources::QueryHandler
- Inherits:
-
Object
- Object
- OpenWeatherAPI::Resources::QueryHandler
- Defined in:
- lib/open-weather-api/resources/handlers/base.rb
Direct Known Subclasses
City, CityID, Current::BoundingBox, Current::Circle, Current::Zipcode, Geolocation
Instance Method Summary collapse
- #can? ⇒ Boolean
- #handle ⇒ Object
-
#initialize(api_obj, parameters = {}) ⇒ QueryHandler
constructor
A new instance of QueryHandler.
Constructor Details
#initialize(api_obj, parameters = {}) ⇒ QueryHandler
Returns a new instance of QueryHandler.
5 6 7 8 |
# File 'lib/open-weather-api/resources/handlers/base.rb', line 5 def initialize(api_obj, parameters = {}) @api_obj = api_obj @parameters = parameters end |
Instance Method Details
#can? ⇒ Boolean
14 15 16 |
# File 'lib/open-weather-api/resources/handlers/base.rb', line 14 def can? value != nil end |
#handle ⇒ Object
10 11 12 |
# File 'lib/open-weather-api/resources/handlers/base.rb', line 10 def handle build if can? end |