Class: Barometer::ConvertedQuery
- Inherits:
-
Object
- Object
- Barometer::ConvertedQuery
- Defined in:
- lib/barometer/query.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#geo ⇒ Object
readonly
Returns the value of attribute geo.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
-
#units ⇒ Object
readonly
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize(q, format, units = :metric, geo = nil) ⇒ ConvertedQuery
constructor
A new instance of ConvertedQuery.
- #metric? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(q, format, units = :metric, geo = nil) ⇒ ConvertedQuery
Returns a new instance of ConvertedQuery.
10 11 12 13 14 15 |
# File 'lib/barometer/query.rb', line 10 def initialize(q, format, units=:metric, geo=nil) @q = q @format = format @units = units @geo = geo end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
8 9 10 |
# File 'lib/barometer/query.rb', line 8 def format @format end |
#geo ⇒ Object (readonly)
Returns the value of attribute geo.
8 9 10 |
# File 'lib/barometer/query.rb', line 8 def geo @geo end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
8 9 10 |
# File 'lib/barometer/query.rb', line 8 def q @q end |
#units ⇒ Object (readonly)
Returns the value of attribute units.
8 9 10 |
# File 'lib/barometer/query.rb', line 8 def units @units end |
Instance Method Details
#metric? ⇒ Boolean
17 18 19 |
# File 'lib/barometer/query.rb', line 17 def metric? units == :metric end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/barometer/query.rb', line 21 def to_s @q end |