Module: ActiveInteractor::Interactor::Perform::ClassMethods
- Included in:
- Base
- Defined in:
- lib/active_interactor/interactor/perform.rb
Overview
Interactor perform class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Instance Method Summary collapse
-
#perform(context = {}, options = {}) ⇒ Class
Initialize a new interactor instance and call its #perform method.
-
#perform!(context = {}, options = {}) ⇒ Class
Initialize a new interactor instance and call its #perform method without rescuing Error::ContextFailure.
Instance Method Details
#perform(context = {}, options = {}) ⇒ Class
Initialize a new interactor instance and call its #perform method. This is the default api to interact with all interactors.
38 39 40 |
# File 'lib/active_interactor/interactor/perform.rb', line 38 def perform(context = {}, = {}) new(context).().execute_perform end |
#perform!(context = {}, options = {}) ⇒ Class
Initialize a new interactor instance and call its #perform method without rescuing Error::ContextFailure.
75 76 77 |
# File 'lib/active_interactor/interactor/perform.rb', line 75 def perform!(context = {}, = {}) new(context).().execute_perform! end |