Class: WeatherGenerator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(baselinedata, precipitation_occurance_chart, options) ⇒ WeatherGenerator

Returns a new instance of WeatherGenerator.



6
7
8
9
10
11
# File 'lib/weathergenerator.rb', line 6

def initialize (baselinedata, precipitation_occurance_chart, options)
  month_for_each_day = make_months_for_days_array(baselinedata, options.month, options.num_days)
  @days = month_for_each_day.map do |month|
    make_weather month, options.dieroller, precipitation_occurance_chart, options.terrain
  end
end

Instance Attribute Details

#daysObject (readonly)

Returns the value of attribute days.



4
5
6
# File 'lib/weathergenerator.rb', line 4

def days
  @days
end