Class: Riot::Helper
- Inherits:
-
RunnableBlock
- Object
- RunnableBlock
- Riot::Helper
- Defined in:
- lib/riot/runnable.rb
Overview
Setup
Instance Attribute Summary
Attributes inherited from RunnableBlock
Instance Method Summary collapse
-
#initialize(name, &definition) ⇒ Helper
constructor
A new instance of Helper.
- #run(situation) ⇒ Object
Methods inherited from RunnableBlock
Constructor Details
#initialize(name, &definition) ⇒ Helper
Returns a new instance of Helper.
23 24 25 26 |
# File 'lib/riot/runnable.rb', line 23 def initialize(name, &definition) super("helper #{name}", &definition) @name = name end |
Instance Method Details
#run(situation) ⇒ Object
28 29 30 31 |
# File 'lib/riot/runnable.rb', line 28 def run(situation) situation.helper(@name, &definition) [:helper] end |