Class: LightServiceExt::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/light-service-ext/configuration.rb

Instance Method Summary collapse

Instance Method Details

#allow_raise_on_failure?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/light-service-ext/configuration.rb', line 12

def allow_raise_on_failure?
  !!allow_raise_on_failure
end

#fatal_error?(exception) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/light-service-ext/configuration.rb', line 20

def fatal_error?(exception)
  !non_fatal_errors.exclude?(exception.class.name)
end

#non_fatal_error?(exception) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/light-service-ext/configuration.rb', line 24

def non_fatal_error?(exception)
  non_fatal_errors.include?(exception.class.name)
end

#non_fatal_errorsObject



16
17
18
# File 'lib/light-service-ext/configuration.rb', line 16

def non_fatal_errors
  (default_non_fatal_error_classes + non_fatal_error_classes).compact.uniq.map(&:to_s).freeze
end