Class: OpenWeatherAPI::Resources::ForecastHourly
- Inherits:
-
Base
- Object
- Base
- OpenWeatherAPI::Resources::ForecastHourly
show all
- Defined in:
- lib/open-weather-api/resources/forecast_hourly.rb
Instance Attribute Summary
Attributes inherited from Base
#api_obj
Instance Method Summary
collapse
Methods inherited from Base
#execute, #initialize
Instance Method Details
#base_url ⇒ Object
5
6
7
|
# File 'lib/open-weather-api/resources/forecast_hourly.rb', line 5
def base_url
return super + 'forecast/'
end
|
#build_params(parameters = {}) ⇒ Object
9
10
11
|
# File 'lib/open-weather-api/resources/forecast_hourly.rb', line 9
def build_params(parameters = {})
super [city, city_id, geolocation].each{ |h| break h.handle if h.can? }
end
|
#city ⇒ Object
14
15
16
|
# File 'lib/open-weather-api/resources/forecast_hourly.rb', line 14
def city
Handlers::City.new @api_obj, @parameters
end
|
#city_id ⇒ Object
18
19
20
|
# File 'lib/open-weather-api/resources/forecast_hourly.rb', line 18
def city_id
Handlers::CityID.new @api_obj, @parameters
end
|
#geolocation ⇒ Object
22
23
24
|
# File 'lib/open-weather-api/resources/forecast_hourly.rb', line 22
def geolocation
Handlers::Geolocation.new @api_obj, @parameters
end
|