Class: Barometer::WeatherService::WundergroundV1::Query
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Barometer::WeatherService::WundergroundV1::Query
- Defined in:
- lib/barometer/weather_services/wunderground_v1/query.rb
Instance Attribute Summary collapse
-
#converted_query ⇒ Object
readonly
Returns the value of attribute converted_query.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query) ⇒ Query
constructor
A new instance of Query.
- #to_param ⇒ Object
Constructor Details
#initialize(query) ⇒ Query
Returns a new instance of Query.
13 14 15 16 |
# File 'lib/barometer/weather_services/wunderground_v1/query.rb', line 13 def initialize(query) super @converted_query = convert_query end |
Instance Attribute Details
#converted_query ⇒ Object (readonly)
Returns the value of attribute converted_query.
7 8 9 |
# File 'lib/barometer/weather_services/wunderground_v1/query.rb', line 7 def converted_query @converted_query end |
Class Method Details
.accepted_formats ⇒ Object
9 10 11 |
# File 'lib/barometer/weather_services/wunderground_v1/query.rb', line 9 def self.accepted_formats [:zipcode, :postalcode, :icao, :coordinates, :geocode] end |
Instance Method Details
#to_param ⇒ Object
18 19 20 |
# File 'lib/barometer/weather_services/wunderground_v1/query.rb', line 18 def to_param {query: converted_query.q.dup} end |