Module: Inprovise::Fork::ContextDSLExt

Defined in:
lib/inprovise/fork/fork.rb

Instance Method Summary collapse

Instance Method Details

#fork(mode = :sync, &action) ⇒ Object



9
10
11
12
13
# File 'lib/inprovise/fork/fork.rb', line 9

def fork(mode=:sync, &action)
  fork = Inprovise::Fork::DSL.new(@context, mode)
  fork.instance_eval(&action) if block_given?
  fork
end