Module: Metaractor::HandleErrors

Defined in:
lib/metaractor/handle_errors.rb

Instance Method Summary collapse

Instance Method Details

#add_error(**args) ⇒ Object



15
16
17
# File 'lib/metaractor/handle_errors.rb', line 15

def add_error(**args)
  context.add_error(object: self, **args)
end

#add_errors(**args) ⇒ Object



19
20
21
# File 'lib/metaractor/handle_errors.rb', line 19

def add_errors(**args)
  context.add_errors(object: self, **args)
end

#error_messagesObject



23
24
25
# File 'lib/metaractor/handle_errors.rb', line 23

def error_messages
  context.error_messages
end

#fail_with_error!(**args) ⇒ Object



7
8
9
# File 'lib/metaractor/handle_errors.rb', line 7

def fail_with_error!(**args)
  context.fail_with_error!(object: self, **args)
end

#fail_with_errors!(**args) ⇒ Object



11
12
13
# File 'lib/metaractor/handle_errors.rb', line 11

def fail_with_errors!(**args)
  context.fail_with_errors!(object: self, **args)
end