lib/interactor.rb
# Internal: Invoke an Interactor instance along with all defined hooks. The
# "run!" method is used internally by the "call!" class method. The following
# are equivalent:
#
#   MyInteractor.call!(foo: "bar")
#   # => #<Interactor::Context foo="bar">
#
#   interactor = MyInteractor.new(foo: "bar")
#   interactor.run!
#   interactor.context
#   # => #<Interactor::Context foo="bar">
#
# After successful invocation of the interactor, the instance is tracked
# within the context. If the context is failed or any error is raised, the
# context is rolled back.
#
# The "run!" method behaves identically to the "run" method with one notable
# exception. If the context is failed during invocation of the interactor,
# the Interactor::Failure is raised.
#
# Returns nothing.
# Raises Interactor::Failure if the context is failed.
Invoke an Interactor instance along with all defined hooks. The
"run!" method is used internally by the "call!" class method. The following
are equivalent.





After successful invocation of the interactor, the instance is tracked
within the context. If the context is failed or any error is raised, the
context is rolled back.

The "run!" method behaves identically to the "run" method with one notable
exception. If the context is failed during invocation of the interactor,
the Interactor::Failure is raised.

Returns nothing.
Raises Interactor::Failure if the context is failed.
Invoke an Interactor instance along with all defined hooks . The " run! " method is used internally by the " call! " class method . The following are equivalent . After successful invocation of the interactor the instance is tracked within the context . If the context is failed or any error is raised the context is rolled back . The " run! " method behaves identically to the " run " method with one notable exception . If the context is failed during invocation of the interactor the Interactor :: Failure is raised . Returns nothing . Raises Interactor :: Failure if the context is failed .
def run!
    with_hooks do
      call
      context.called!(self)
    end
  rescue
    context.rollback!
    raise
  end
def run! with_hooks do call context . called! ( self ) end rescue context . rollback! raise end
Internal: Invoke an Interactor instance along with all defined hooks.
Internal : Invoke an Interactor instance along with all defined hooks .