Class: Dionysus::Producer::Suppressor

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/producer/suppressor.rb

Class Method Summary collapse

Class Method Details

.suppress!Object



11
12
13
# File 'lib/dionysus/producer/suppressor.rb', line 11

def self.suppress!
  Thread.current[SUPPRESSION_KEY] = true
end

.suppressed?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/dionysus/producer/suppressor.rb', line 7

def self.suppressed?
  Thread.current[SUPPRESSION_KEY] == true
end

.unsuppress!Object



15
16
17
# File 'lib/dionysus/producer/suppressor.rb', line 15

def self.unsuppress!
  Thread.current[SUPPRESSION_KEY] = nil
end