Class: Unreliable::Config
- Inherits:
-
Object
- Object
- Unreliable::Config
- Defined in:
- lib/unreliable/config.rb
Class Method Summary collapse
Class Method Details
.disable ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/unreliable/config.rb', line 13 def self.disable prev_enabled = @enabled @enabled = false yield ensure @enabled = prev_enabled end |
.enabled? ⇒ Boolean
9 10 11 |
# File 'lib/unreliable/config.rb', line 9 def self.enabled? @enabled && Rails.env.test? end |
.setup! ⇒ Object
5 6 7 |
# File 'lib/unreliable/config.rb', line 5 def self.setup! @enabled = true end |