class Recorder::Config

Global configuration options

Attributes

async[R]
ignore[R]
sidekiq_options[RW]

Public Class Methods

new() click to toggle source
# File lib/recorder/config.rb, line 12
def initialize
  # Variables which affect all threads, whose access is synchronized.
  @mutex = Mutex.new
  @enabled = true

  @sidekiq_options = {
    queue: 'recorder',
    retry: 10,
    backtrace: true
  }

  @ignore = []
  @async = false
end

Public Instance Methods

async=(value) click to toggle source
# File lib/recorder/config.rb, line 31
def async=(value)
  @async = !!value
end
enabled() click to toggle source

Indicates whether Recorder is on or off. Default: true.

# File lib/recorder/config.rb, line 36
def enabled
  @mutex.synchronize { !!@enabled }
end
enabled=(enable) click to toggle source
# File lib/recorder/config.rb, line 40
def enabled=(enable)
  @mutex.synchronize { @enabled = enable }
end
ignore=(value) click to toggle source
# File lib/recorder/config.rb, line 27
def ignore=(value)
  @ignore = Array.wrap(value).map(&:to_sym)
end