Class: AdLint::LineWiseMessageSuppressor
- Inherits:
-
MessageSuppressor
- Object
- MessageSuppressor
- AdLint::LineWiseMessageSuppressor
- Defined in:
- lib/adlint/supp.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Class Method Summary collapse
Instance Method Summary collapse
- #file_wise? ⇒ Boolean
-
#initialize(target_msg_ids, annot_loc) ⇒ LineWiseMessageSuppressor
constructor
A new instance of LineWiseMessageSuppressor.
- #line_wise? ⇒ Boolean
Methods inherited from MessageSuppressor
Constructor Details
#initialize(target_msg_ids, annot_loc) ⇒ LineWiseMessageSuppressor
Returns a new instance of LineWiseMessageSuppressor.
115 116 117 118 |
# File 'lib/adlint/supp.rb', line 115 def initialize(target_msg_ids, annot_loc) super(target_msg_ids) @key = [annot_loc.fpath, annot_loc.line_no] end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
120 121 122 |
# File 'lib/adlint/supp.rb', line 120 def key @key end |
Class Method Details
.key_of(loc) ⇒ Object
111 112 113 |
# File 'lib/adlint/supp.rb', line 111 def self.key_of(loc) [loc.fpath, loc.line_no] end |
Instance Method Details
#file_wise? ⇒ Boolean
122 123 124 |
# File 'lib/adlint/supp.rb', line 122 def file_wise? false end |
#line_wise? ⇒ Boolean
126 127 128 |
# File 'lib/adlint/supp.rb', line 126 def line_wise? true end |