Module: Resque::UniqueAtRuntime

Defined in:
lib/resque-unique_at_runtime.rb,
lib/resque/unique_at_runtime/version.rb,
lib/resque/unique_at_runtime/configuration.rb

Defined Under Namespace

Classes: Configuration

Constant Summary collapse

PLUGIN_TAG =
(ColorizedString['[R-UAR] '].blue).freeze
VERSION =
'4.0.1'

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



41
42
43
# File 'lib/resque-unique_at_runtime.rb', line 41

def configuration
  @configuration
end

Class Method Details

.debug(message) ⇒ Object



30
31
32
# File 'lib/resque-unique_at_runtime.rb', line 30

def debug(message)
  configuration.logger&.debug("#{PLUGIN_TAG}#{message}") if configuration.debug_mode
end

.log(message) ⇒ Object



26
27
28
# File 'lib/resque-unique_at_runtime.rb', line 26

def log(message)
  configuration.logger&.send(configuration.log_level, message) if configuration.logger
end

Instance Method Details

#configure {|@configuration| ... } ⇒ Object

For per-class config with a block

Yields:



35
36
37
# File 'lib/resque-unique_at_runtime.rb', line 35

def configure
  yield(@configuration)
end