Class: NoaaWeatherClient::Templates::Forecast
- Inherits:
-
Struct
- Object
- Struct
- NoaaWeatherClient::Templates::Forecast
- Defined in:
- lib/noaa_weather_client/cli/templates.rb
Instance Attribute Summary collapse
-
#forecast ⇒ Object
Returns the value of attribute forecast.
Instance Method Summary collapse
Instance Attribute Details
#forecast ⇒ Object
Returns the value of attribute forecast
44 45 46 |
# File 'lib/noaa_weather_client/cli/templates.rb', line 44 def forecast @forecast end |
Instance Method Details
#to_s ⇒ Object
45 46 47 48 49 50 |
# File 'lib/noaa_weather_client/cli/templates.rb', line 45 def to_s template = "\n#{forecast.days.size}-Day Forecast\n" template += "================================================================================\n" forecast.days.each { |d| template += ForecastDay.new(d).to_s } template end |