Module: Card::Director::Run
- Included in:
- Card::Director
- Defined in:
- lib/card/director/run.rb
Overview
methods for running stages
Instance Method Summary collapse
- #catch_up_to_stage(next_stage) ⇒ Object
- #delay! ⇒ Object
- #restart ⇒ Object
- #run_delayed_event(act) ⇒ Object
Instance Method Details
#catch_up_to_stage(next_stage) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/card/director/run.rb', line 5 def catch_up_to_stage next_stage return if @delay && before?(:integrate_with_delay, next_stage) upto_stage(next_stage) do |stage| run_stage stage end end |
#delay! ⇒ Object
21 22 23 |
# File 'lib/card/director/run.rb', line 21 def delay! @delay = true end |
#restart ⇒ Object
25 26 27 28 |
# File 'lib/card/director/run.rb', line 25 def restart @running = false @current_stage_index = nil end |
#run_delayed_event(act) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/card/director/run.rb', line 13 def run_delayed_event act @running = true @act = act @current_stage_index = stage_index :integrate_with_delay yield run_subcard_stages :integrate_with_delay end |