Class: Barometer::ForecastIo
- Inherits:
-
Object
- Object
- Barometer::ForecastIo
show all
- Defined in:
- lib/barometer/forecast_io.rb,
lib/barometer/forecast_io/api.rb,
lib/barometer/forecast_io/query.rb,
lib/barometer/forecast_io/version.rb,
lib/barometer/forecast_io/response.rb,
lib/barometer/forecast_io/response/location.rb,
lib/barometer/forecast_io/response/timezone.rb,
lib/barometer/forecast_io/response/current_weather.rb,
lib/barometer/forecast_io/response/forecasted_weather.rb
Defined Under Namespace
Classes: Api, Query, Response
Constant Summary
collapse
- VERSION =
'0.0.1'
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(query, config = {}) ⇒ ForecastIo
Returns a new instance of ForecastIo.
12
13
14
15
|
# File 'lib/barometer/forecast_io.rb', line 12
def initialize(query, config={})
@query = query
@apikey = config[:keys][:api] if config[:keys]
end
|
Class Method Details
.call(query, config = {}) ⇒ Object
8
9
10
|
# File 'lib/barometer/forecast_io.rb', line 8
def self.call(query, config={})
ForecastIo.new(query, config).measure!
end
|