Class: Magicseaweed::Forecast
- Inherits:
-
Object
- Object
- Magicseaweed::Forecast
- Defined in:
- lib/magicseaweed/forecast.rb
Overview
Generate a forecast to be printed
Instance Method Summary collapse
-
#initialize(api_key:, spot_id:) ⇒ Forecast
constructor
A new instance of Forecast.
- #to_s ⇒ Object
Constructor Details
#initialize(api_key:, spot_id:) ⇒ Forecast
Returns a new instance of Forecast.
8 9 10 11 |
# File 'lib/magicseaweed/forecast.rb', line 8 def initialize(api_key:, spot_id:) @api_key = api_key @spot_id = spot_id end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/magicseaweed/forecast.rb', line 13 def to_s "Spot: #{spot_id}\nForecast:\n#{.join(', ')}" end |