Class: WeatherBug::LiveObservation
- Inherits:
-
TransformableData
- Object
- TransformableData
- WeatherBug::LiveObservation
- Defined in:
- lib/weatherbug/live_observation.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TransformableData
Class Method Details
.from_document(document) ⇒ Object
21 22 23 24 25 |
# File 'lib/weatherbug/live_observation.rb', line 21 def self.from_document(document) lops = super raise NoSuchStation, 'No such station' if lops.station_id.empty? lops end |
Instance Method Details
#station ⇒ Object
27 28 29 |
# File 'lib/weatherbug/live_observation.rb', line 27 def station @station_reference ||= WeatherBug.get_station(self.station_id) end |