Module: ActiveInteractor::Interactor::InteractionMethods::ClassMethods

Defined in:
lib/active_interactor/interactor/interaction_methods.rb

Instance Method Summary collapse

Instance Method Details

#perform(input_context = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/active_interactor/interactor/interaction_methods.rb', line 13

def perform(input_context = {})
  perform!(input_context)
rescue Error => e
  e.result
rescue StandardError => e
  Result.failure(errors: e.message)
end

#perform!(input_context = {}) ⇒ Object



9
10
11
# File 'lib/active_interactor/interactor/interaction_methods.rb', line 9

def perform!(input_context = {})
  new(input_context).perform!
end