Class: Recorder::Config
- Inherits:
-
Object
- Object
- Recorder::Config
- Includes:
- Singleton
- Defined in:
- lib/recorder/config.rb
Overview
Global configuration options
Instance Attribute Summary collapse
-
#async ⇒ Object
Returns the value of attribute async.
-
#ignore ⇒ Object
Returns the value of attribute ignore.
-
#sidekiq_options ⇒ Object
Returns the value of attribute sidekiq_options.
Instance Method Summary collapse
-
#enabled ⇒ Object
Indicates whether Recorder is on or off.
- #enabled=(enable) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/recorder/config.rb', line 12 def initialize # Variables which affect all threads, whose access is synchronized. @mutex = Mutex.new @enabled = true = { queue: 'recorder', retry: 10, backtrace: true } @ignore = [] @async = false end |
Instance Attribute Details
#async ⇒ Object
Returns the value of attribute async.
10 11 12 |
# File 'lib/recorder/config.rb', line 10 def async @async end |
#ignore ⇒ Object
Returns the value of attribute ignore.
10 11 12 |
# File 'lib/recorder/config.rb', line 10 def ignore @ignore end |
#sidekiq_options ⇒ Object
Returns the value of attribute sidekiq_options.
9 10 11 |
# File 'lib/recorder/config.rb', line 9 def end |
Instance Method Details
#enabled ⇒ Object
Indicates whether Recorder is on or off. Default: true.
36 37 38 |
# File 'lib/recorder/config.rb', line 36 def enabled @mutex.synchronize { !!@enabled } end |
#enabled=(enable) ⇒ Object
40 41 42 |
# File 'lib/recorder/config.rb', line 40 def enabled=(enable) @mutex.synchronize { @enabled = enable } end |