Class: SidekiqRemappableErrors::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq_remappable_errors/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(remapped_error_class: RemappedError) ⇒ Config

Returns a new instance of Config.

[View source]

5
6
7
# File 'lib/sidekiq_remappable_errors/config.rb', line 5

def initialize(remapped_error_class: RemappedError)
  self.remapped_error_class = remapped_error_class
end

Instance Attribute Details

#remapped_error_classObject

Returns the value of attribute remapped_error_class.


8
9
10
# File 'lib/sidekiq_remappable_errors/config.rb', line 8

def remapped_error_class
  @remapped_error_class
end

Instance Method Details

#validate!Object

Raises:

[View source]

10
11
12
13
14
# File 'lib/sidekiq_remappable_errors/config.rb', line 10

def validate!
  return true if remapped_error_class <= Exception

  raise InvalidConfigError, "'remapped_error_class' must be an Exception"
end