Class: Steep::Diagnostic::Ruby::InvalidIgnoreComment

Inherits:
Base
  • Object
show all
Defined in:
lib/steep/diagnostic/ruby.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#location, #node

Instance Method Summary collapse

Methods inherited from Base

#detail_lines, #diagnostic_code

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(comment:) ⇒ InvalidIgnoreComment

Returns a new instance of InvalidIgnoreComment.



950
951
952
953
# File 'lib/steep/diagnostic/ruby.rb', line 950

def initialize(comment:)
  @comment = comment
  super(node: nil, location: comment.location.expression)
end

Instance Attribute Details

#commentObject (readonly)

Returns the value of attribute comment.



948
949
950
# File 'lib/steep/diagnostic/ruby.rb', line 948

def comment
  @comment
end

Instance Method Details

#header_lineObject



955
956
957
# File 'lib/steep/diagnostic/ruby.rb', line 955

def header_line
  "Invalid ignore comment"
end