Class: Steep::Diagnostic::Ruby::AnnotationSyntaxError

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(message:, location:) ⇒ AnnotationSyntaxError

Returns a new instance of AnnotationSyntaxError.



827
828
829
830
# File 'lib/steep/diagnostic/ruby.rb', line 827

def initialize(message: ,location:)
  super(node: nil, location: location)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



825
826
827
# File 'lib/steep/diagnostic/ruby.rb', line 825

def message
  @message
end

Instance Method Details

#header_lineObject



832
833
834
# File 'lib/steep/diagnostic/ruby.rb', line 832

def header_line
  "Type annotation has a syntax error: #{message}"
end