Class: Barometer::Utils::Api
- Inherits:
-
Object
- Object
- Barometer::Utils::Api
show all
- Defined in:
- lib/barometer/utils/api.rb
Direct Known Subclasses
Query::Service::GeonamesTimezone::Api, Query::Service::GoogleGeocode::Api, Query::Service::NoaaStation::Api, Query::Service::WeatherId::Api, Query::Service::WundergroundTimezone::Api, Query::Service::YahooPlacefinder::Api, Query::Service::YahooWeather::Api, WeatherService::Noaa::CurrentApi, WeatherService::Noaa::ForecastApi, WeatherService::WeatherBug::CurrentApi, WeatherService::WeatherBug::ForecastApi, WeatherService::WundergroundV1::CurrentApi, WeatherService::WundergroundV1::ForecastApi, WeatherService::Yahoo::Api
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(query) ⇒ Api
Returns a new instance of Api.
6
7
8
|
# File 'lib/barometer/utils/api.rb', line 6
def initialize(query)
@query = query
end
|
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
4
5
6
|
# File 'lib/barometer/utils/api.rb', line 4
def query
@query
end
|
Instance Method Details
#current_query ⇒ Object
10
11
12
|
# File 'lib/barometer/utils/api.rb', line 10
def current_query
@query.converted_query if @query.respond_to?(:converted_query)
end
|
#params ⇒ Object
17
18
19
|
# File 'lib/barometer/utils/api.rb', line 17
def params
@query.to_param
end
|
#unwrap_nodes ⇒ Object
21
22
23
|
# File 'lib/barometer/utils/api.rb', line 21
def unwrap_nodes
[]
end
|
#url ⇒ Object
14
15
|
# File 'lib/barometer/utils/api.rb', line 14
def url
end
|