Class: WeatherGeneratorOptions
- Inherits:
-
Object
- Object
- WeatherGeneratorOptions
- Defined in:
- lib/options.rb
Instance Attribute Summary collapse
-
#dieroller ⇒ Object
readonly
Returns the value of attribute dieroller.
-
#month ⇒ Object
readonly
Returns the value of attribute month.
-
#num_days ⇒ Object
readonly
Returns the value of attribute num_days.
-
#terrain ⇒ Object
readonly
Returns the value of attribute terrain.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ WeatherGeneratorOptions
constructor
A new instance of WeatherGeneratorOptions.
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
#dieroller ⇒ Object (readonly)
Returns the value of attribute dieroller.
6 7 8 |
# File 'lib/options.rb', line 6 def dieroller @dieroller end |
#month ⇒ Object (readonly)
Returns the value of attribute month.
4 5 6 |
# File 'lib/options.rb', line 4 def month @month end |
#num_days ⇒ Object (readonly)
Returns the value of attribute num_days.
5 6 7 |
# File 'lib/options.rb', line 5 def num_days @num_days end |
#terrain ⇒ Object (readonly)
Returns the value of attribute terrain.
7 8 9 |
# File 'lib/options.rb', line 7 def terrain @terrain end |