# File lib/state_machine/transition.rb, line 184 def run_callbacks(options = {}, &block) options = {:after => true}.merge(options) @success = false halted = pausable { before(options[:after], &block) } # After callbacks are only run if: # * An around callback didn't halt after yielding # * They're enabled or the run didn't succeed after if !(@before_run && halted) && (options[:after] || !@success) @before_run end