Class: OpenWeatherAPI::Resources::Handlers::QueryHandler
- Inherits:
-
Object
- Object
- OpenWeatherAPI::Resources::Handlers::QueryHandler
show all
- Defined in:
- lib/open-weather-api/resources/handlers/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(api_obj, parameters = {}) ⇒ QueryHandler
Returns a new instance of QueryHandler.
6
7
8
9
|
# File 'lib/open-weather-api/resources/handlers/base.rb', line 6
def initialize(api_obj, parameters = {})
@api_obj = api_obj
@parameters = parameters
end
|
Instance Method Details
#can? ⇒ Boolean
15
16
17
|
# File 'lib/open-weather-api/resources/handlers/base.rb', line 15
def can?
value != nil
end
|
#handle ⇒ Object
11
12
13
|
# File 'lib/open-weather-api/resources/handlers/base.rb', line 11
def handle
build if can?
end
|