module Isolator::Callbacks

Add before_isolate and after_isolate callbacks

Public Instance Methods

after_isolate(&block) click to toggle source
# File lib/isolator/callbacks.rb, line 10
def after_isolate(&block)
  after_isolate_callbacks << block
end
after_isolate_callbacks() click to toggle source
# File lib/isolator/callbacks.rb, line 28
def after_isolate_callbacks
  @after_isolate_callbacks ||= []
end
before_isolate(&block) click to toggle source
# File lib/isolator/callbacks.rb, line 6
def before_isolate(&block)
  before_isolate_callbacks << block
end
before_isolate_callbacks() click to toggle source
# File lib/isolator/callbacks.rb, line 24
def before_isolate_callbacks
  @before_isolate_callbacks ||= []
end
finish!() click to toggle source
# File lib/isolator/callbacks.rb, line 19
def finish!
  return if Isolator.disabled?
  after_isolate_callbacks.each(&:call)
end
start!() click to toggle source
# File lib/isolator/callbacks.rb, line 14
def start!
  return if Isolator.disabled?
  before_isolate_callbacks.each(&:call)
end