Class: Tablescript::RollAndIgnoreStrategy
- Inherits:
-
Object
- Object
- Tablescript::RollAndIgnoreStrategy
- Defined in:
- lib/tablescript/roll_and_ignore_strategy.rb
Overview
RollAndIgnoreStrategy
Instance Method Summary collapse
-
#initialize(table, rollset, roller = nil) ⇒ RollAndIgnoreStrategy
constructor
A new instance of RollAndIgnoreStrategy.
- #roll ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(table, rollset, roller = nil) ⇒ RollAndIgnoreStrategy
Returns a new instance of RollAndIgnoreStrategy.
23 24 25 26 27 28 29 |
# File 'lib/tablescript/roll_and_ignore_strategy.rb', line 23 def initialize(table, rollset, roller = nil) @table = table @rollset = rollset @roller = roller || RpgLib::DiceRoller.instance @roll = nil @value = nil end |
Instance Method Details
#roll ⇒ Object
31 32 33 34 |
# File 'lib/tablescript/roll_and_ignore_strategy.rb', line 31 def roll evaluate @roll end |
#value ⇒ Object
36 37 38 39 |
# File 'lib/tablescript/roll_and_ignore_strategy.rb', line 36 def value evaluate @value end |