Class: Barometer::ForecastIo::Query
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Barometer::ForecastIo::Query
- Defined in:
- lib/barometer/forecast_io/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
- #units_param ⇒ Object
Constructor Details
#initialize(query) ⇒ Query
Returns a new instance of Query.
12 13 14 15 |
# File 'lib/barometer/forecast_io/query.rb', line 12 def initialize(query) super @converted_query = convert_query end |
Instance Attribute Details
#converted_query ⇒ Object (readonly)
Returns the value of attribute converted_query.
6 7 8 |
# File 'lib/barometer/forecast_io/query.rb', line 6 def converted_query @converted_query end |
Class Method Details
.accepted_formats ⇒ Object
8 9 10 |
# File 'lib/barometer/forecast_io/query.rb', line 8 def self.accepted_formats [:coordinates] end |
Instance Method Details
#to_param ⇒ Object
17 18 19 |
# File 'lib/barometer/forecast_io/query.rb', line 17 def to_param @converted_query.q end |
#units_param ⇒ Object
21 22 23 |
# File 'lib/barometer/forecast_io/query.rb', line 21 def units_param {units: unit_type} end |