Class: NoaaWeatherClient::Templates::CurrentObservations
- Inherits:
-
Struct
- Object
- Struct
- NoaaWeatherClient::Templates::CurrentObservations
- Defined in:
- lib/noaa_weather_client/cli/templates.rb
Instance Attribute Summary collapse
-
#observation ⇒ Object
Returns the value of attribute observation.
Instance Method Summary collapse
Instance Attribute Details
#observation ⇒ Object
Returns the value of attribute observation
3 4 5 |
# File 'lib/noaa_weather_client/cli/templates.rb', line 3 def observation @observation end |
Instance Method Details
#to_s ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/noaa_weather_client/cli/templates.rb', line 4 def to_s <<-template Current Observations ================================================================================ StationID: #{observation.station_id} Station Name: #{observation.location} Location: #{observation.latitude}, #{observation.longitude} Observation Time: #{observation.observation_time_string} Temperature: #{observation.temperature_fahrenheit} | #{observation.temperature_celsius} Dewpoint: #{observation.dewpoint_fahrenheit} | #{observation.dewpoint_celsius} Pressure: #{observation.pressure_in} in | #{observation.pressure_mb} mb Humidity: #{observation.relative_humidity} Wind: #{observation.wind_string} Wind Direction: #{observation.wind_dir} | #{observation.wind_degrees} degrees Wind Speed: #{observation.wind_mph} mph | #{observation.wind_kt} kt Visibility: #{observation.visibility_mi} mi template end |