module Excom::Plugins::Errors
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/excom/plugins/errors.rb, line 20 def initialize(*) super state.errors = errors_class.new end
used(service_class, *)
click to toggle source
# File lib/excom/plugins/errors.rb, line 6 def self.used(service_class, *) service_class.add_execution_prop(:errors) end
Public Instance Methods
errors()
click to toggle source
# File lib/excom/plugins/errors.rb, line 25 def errors state.errors end
execute(*)
click to toggle source
Calls superclass method
# File lib/excom/plugins/errors.rb, line 10 def execute(*) super if self.class.plugins[:errors].options[:fail_if_present] && !errors.empty? failure! end self end
Private Instance Methods
clear_execution_state!()
click to toggle source
Calls superclass method
# File lib/excom/plugins/errors.rb, line 33 def clear_execution_state! super state.errors = errors_class.new end
errors_class()
click to toggle source
# File lib/excom/plugins/errors.rb, line 29 def errors_class self.class.plugins[:errors].options[:errors_class] end