Class: WeatherGeneratorOptions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ WeatherGeneratorOptions

Returns a new instance of WeatherGeneratorOptions.



9
10
11
12
13
14
# File 'lib/options.rb', line 9

def initialize (args = {})
  @month = args.fetch(:month, 1)
  @num_days = args.fetch(:num_days, 28)
  @dieroller = args.fetch(:dieroller, DieRoller.new)
  @terrain = args.fetch(:terrain, :plains)
end

Instance Attribute Details

#dierollerObject (readonly)

Returns the value of attribute dieroller.



6
7
8
# File 'lib/options.rb', line 6

def dieroller
  @dieroller
end

#monthObject (readonly)

Returns the value of attribute month.



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

def month
  @month
end

#num_daysObject (readonly)

Returns the value of attribute num_days.



5
6
7
# File 'lib/options.rb', line 5

def num_days
  @num_days
end

#terrainObject (readonly)

Returns the value of attribute terrain.



7
8
9
# File 'lib/options.rb', line 7

def terrain
  @terrain
end