Class: Steep::Diagnostic::Ruby::SyntaxError

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:) ⇒ SyntaxError

Returns a new instance of SyntaxError.



814
815
816
817
# File 'lib/steep/diagnostic/ruby.rb', line 814

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



812
813
814
# File 'lib/steep/diagnostic/ruby.rb', line 812

def message
  @message
end

Instance Method Details

#header_lineObject



819
820
821
# File 'lib/steep/diagnostic/ruby.rb', line 819

def header_line
  "SyntaxError: #{message}"
end