Class: Barometer::Base
- Inherits:
-
Object
- Object
- Barometer::Base
- Defined in:
- lib/barometer/base.rb
Instance Attribute Summary collapse
-
#weather ⇒ Object
readonly
Returns the value of attribute weather.
Instance Method Summary collapse
-
#initialize(query, units = :metric) ⇒ Base
constructor
A new instance of Base.
- #measure ⇒ Object
Constructor Details
Instance Attribute Details
#weather ⇒ Object (readonly)
Returns the value of attribute weather.
3 4 5 |
# File 'lib/barometer/base.rb', line 3 def weather @weather end |
Instance Method Details
#measure ⇒ Object
10 11 12 13 14 15 |
# File 'lib/barometer/base.rb', line 10 def measure record_time do measure_until_successful or raise OutOfSources end weather end |