module MtkFramework::ActiveInteractionConcerns::Interruptable

Public Instance Methods

interrupt_execute!(*args) click to toggle source
# File lib/mtk_framework/active_interaction_concerns/interruptable.rb, line 17
def interrupt_execute!(*args)
  if args.any?
    if args[0].is_a? ActiveModel::Errors
      errors.merge!(args[0])
    else
      errors.add(*args)
    end
  end

  raise 'interrupt_execute! called without error' if errors.empty?

  raise ApplicationInterrupt
end