Module: ActiveInteractor::Interactor::ClassMethods
- Defined in:
- lib/active_interactor/interactor.rb
Overview
Instance Method Summary collapse
-
#perform(context = {}) ⇒ ActiveInteractor::Context::Base
Invoke an interactor.
-
#perform!(context = {}) ⇒ ActiveInteractor::Context::Base
Invoke an Interactor.
Instance Method Details
#perform(context = {}) ⇒ ActiveInteractor::Context::Base
Invoke an interactor. This is the primary public API method to an
interactor.
33 34 35 |
# File 'lib/active_interactor/interactor.rb', line 33 def perform(context = {}) new(context).execute_perform end |
#perform!(context = {}) ⇒ ActiveInteractor::Context::Base
Invoke an Interactor. The #perform! method behaves identically to
the {.perform} method with one notable exception. If the context is failed
during invocation of the interactor, the {ActiveInteractor::Context::Failure}
is raised.
48 49 50 |
# File 'lib/active_interactor/interactor.rb', line 48 def perform!(context = {}) new(context).execute_perform! end |