Module: Tester
- Included in:
- Gamefic::Plot, Gamefic::Subplot
- Defined in:
- lib/gamefic-standard/test.rb
Instance Method Summary collapse
Instance Method Details
#on_test(name = :me, &block) ⇒ Object
6 7 8 |
# File 'lib/gamefic-standard/test.rb', line 6 def on_test name = :me, &block test_procs[name] = block end |
#run_test(name, actor) ⇒ Object
10 11 12 13 14 |
# File 'lib/gamefic-standard/test.rb', line 10 def run_test name, actor queue = [] test_procs[name].call(actor, queue) actor.queue.concat queue end |
#test_procs ⇒ Object
2 3 4 |
# File 'lib/gamefic-standard/test.rb', line 2 def test_procs @test_procs ||= Hash.new end |