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.



977
978
979
980
# File 'lib/steep/diagnostic/ruby.rb', line 977

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

Instance Attribute Details

#commentObject (readonly)

Returns the value of attribute comment.



975
976
977
# File 'lib/steep/diagnostic/ruby.rb', line 975

def comment
  @comment
end

Instance Method Details

#header_lineObject



982
983
984
# File 'lib/steep/diagnostic/ruby.rb', line 982

def header_line
  "Invalid ignore comment"
end