Class: Logster::SuppressionPattern

Inherits:
Pattern
  • Object
show all
Defined in:
lib/logster/suppression_pattern.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pattern

find, find_all, #initialize, #modify, parse_pattern, #pattern, #to_s, #valid?, valid?

Constructor Details

This class inherits a constructor from Logster::Pattern

Class Method Details

.set_nameObject



3
4
5
# File 'lib/logster/suppression_pattern.rb', line 3

def self.set_name
  "__LOGSTER__suppression_patterns_set".freeze
end

Instance Method Details

#destroy(clear_cache: true) ⇒ Object

arg used in tests



12
13
14
15
16
# File 'lib/logster/suppression_pattern.rb', line 12

def destroy(clear_cache: true) # arg used in tests
  super()
  @store.remove_ignore_count(self.to_s)
  @store.clear_suppression_patterns_cache if clear_cache
end

#saveObject



7
8
9
10
# File 'lib/logster/suppression_pattern.rb', line 7

def save
  super
  @store.clear_suppression_patterns_cache
end