Class: AdLint::Postfilter::MessageFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/adlint/postfilter/filter.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ MessageFilter

Returns a new instance of MessageFilter.



39
40
41
42
# File 'lib/adlint/postfilter/filter.rb', line 39

def initialize(config)
  @config = config
  @target_content = MessageFileContent.new(@config.msg_fpath)
end

Instance Method Details

#execute(stderr_content) ⇒ Object



44
45
46
47
48
# File 'lib/adlint/postfilter/filter.rb', line 44

def execute(stderr_content)
  @config.suppression_list.apply_to(@target_content)
  @target_content.overwrite!
  @config.suppression_list.apply_to(stderr_content)
end