Class: WeatherBug::Station
- Inherits:
-
TransformableData
- Object
- TransformableData
- WeatherBug::Station
- Defined in:
- lib/weatherbug/station.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TransformableData
Class Method Details
.from_document(document) ⇒ Object
17 18 19 20 21 |
# File 'lib/weatherbug/station.rb', line 17 def self.from_document(document) station = super raise ArgumentError.new('No such station') if station.station_id.empty? station end |
Instance Method Details
#forecast ⇒ Object
27 28 29 |
# File 'lib/weatherbug/station.rb', line 27 def forecast WeatherBug.forecast(:latitude => latitude, :longitude => longitude) end |
#live_observation(unit = :f) ⇒ Object
23 24 25 |
# File 'lib/weatherbug/station.rb', line 23 def live_observation(unit = :f) WeatherBug.live_observation(self, unit) end |