Class: AdLint::Postfilter::FileWiseSuppression

Inherits:
MessageWiseSuppression show all
Includes:
Deactivatable
Defined in:
lib/adlint/postfilter/suppress.rb

Instance Attribute Summary collapse

Attributes included from Deactivatable

#active

Attributes inherited from MessageWiseSuppression

#message_id

Instance Method Summary collapse

Methods included from Deactivatable

#active?

Constructor Details

#initialize(message_id, fpath, active) ⇒ FileWiseSuppression

Returns a new instance of FileWiseSuppression.



88
89
90
91
92
# File 'lib/adlint/postfilter/suppress.rb', line 88

def initialize(message_id, fpath, active)
  super(message_id)
  @fpath = fpath
  self.active = active
end

Instance Attribute Details

#fpathObject (readonly)

Returns the value of attribute fpath.



94
95
96
# File 'lib/adlint/postfilter/suppress.rb', line 94

def fpath
  @fpath
end

Instance Method Details

#_match_with?(message_line) ⇒ Boolean

Returns:

  • (Boolean)


96
97
98
99
100
101
102
# File 'lib/adlint/postfilter/suppress.rb', line 96

def _match_with?(message_line)
  if self.active?
    super && message_line.fpath == @fpath
  else
    false
  end
end