Class: AdLint::Postfilter::MessageLine
- Defined in:
- lib/adlint/postfilter/content.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#fpath ⇒ Object
readonly
Returns the value of attribute fpath.
-
#line_no ⇒ Object
readonly
Returns the value of attribute line_no.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
Instance Method Summary collapse
- #filterable? ⇒ Boolean
-
#initialize(str, fpath_str, line_no_str, message_id_str) ⇒ MessageLine
constructor
A new instance of MessageLine.
- #match_with?(suppression) ⇒ Boolean
Constructor Details
#initialize(str, fpath_str, line_no_str, message_id_str) ⇒ MessageLine
Returns a new instance of MessageLine.
93 94 95 96 97 98 99 |
# File 'lib/adlint/postfilter/content.rb', line 93 def initialize(str, fpath_str, line_no_str, ) super(str) @fpath = Pathname.new(fpath_str).realpath @line_no = line_no_str ? line_no_str.to_i : nil @message_id = .to_sym end |
Instance Attribute Details
#fpath ⇒ Object (readonly)
Returns the value of attribute fpath.
101 102 103 |
# File 'lib/adlint/postfilter/content.rb', line 101 def fpath @fpath end |
#line_no ⇒ Object (readonly)
Returns the value of attribute line_no.
102 103 104 |
# File 'lib/adlint/postfilter/content.rb', line 102 def line_no @line_no end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
103 104 105 |
# File 'lib/adlint/postfilter/content.rb', line 103 def @message_id end |
Instance Method Details
#filterable? ⇒ Boolean
105 106 107 |
# File 'lib/adlint/postfilter/content.rb', line 105 def filterable? true end |
#match_with?(suppression) ⇒ Boolean
109 110 111 |
# File 'lib/adlint/postfilter/content.rb', line 109 def match_with?(suppression) suppression._match_with?(self) end |