Class: Magicseaweed::Forecast

Inherits:
Object
  • Object
show all
Defined in:
lib/magicseaweed/forecast.rb

Overview

Generate a forecast to be printed

Instance Method Summary collapse

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_sObject



13
14
15
# File 'lib/magicseaweed/forecast.rb', line 13

def to_s
  "Spot: #{spot_id}\nForecast:\n#{daily_ratings.join(', ')}"
end