Class: AdLint::LineWiseMessageSuppressor

Inherits:
MessageSuppressor show all
Defined in:
lib/adlint/supp.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageSuppressor

#suppress?

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

#keyObject (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

Returns:

  • (Boolean)


122
123
124
# File 'lib/adlint/supp.rb', line 122

def file_wise?
  false
end

#line_wise?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/adlint/supp.rb', line 126

def line_wise?
  true
end