Class: AdLint::Postfilter::LineWiseSuppression
- Inherits:
-
MessageWiseSuppression
- Object
- MessageSuppression
- MessageWiseSuppression
- AdLint::Postfilter::LineWiseSuppression
- Includes:
- Deactivatable
- Defined in:
- lib/adlint/postfilter/suppress.rb
Instance Attribute Summary collapse
-
#fpath ⇒ Object
readonly
Returns the value of attribute fpath.
-
#line_no ⇒ Object
readonly
Returns the value of attribute line_no.
Attributes included from Deactivatable
Attributes inherited from MessageWiseSuppression
Instance Method Summary collapse
- #_match_with?(message_line) ⇒ Boolean
-
#initialize(message_id, fpath, line_no, active) ⇒ LineWiseSuppression
constructor
A new instance of LineWiseSuppression.
Methods included from Deactivatable
Constructor Details
#initialize(message_id, fpath, line_no, active) ⇒ LineWiseSuppression
Returns a new instance of LineWiseSuppression.
108 109 110 111 112 |
# File 'lib/adlint/postfilter/suppress.rb', line 108 def initialize(, fpath, line_no, active) super() @fpath, @line_no = fpath, line_no self.active = active end |
Instance Attribute Details
#fpath ⇒ Object (readonly)
Returns the value of attribute fpath.
114 115 116 |
# File 'lib/adlint/postfilter/suppress.rb', line 114 def fpath @fpath end |
#line_no ⇒ Object (readonly)
Returns the value of attribute line_no.
115 116 117 |
# File 'lib/adlint/postfilter/suppress.rb', line 115 def line_no @line_no end |
Instance Method Details
#_match_with?(message_line) ⇒ Boolean
117 118 119 120 121 122 123 124 |
# File 'lib/adlint/postfilter/suppress.rb', line 117 def _match_with?() if self.active? super && .fpath == @fpath && .line_no == @line_no else false end end |