Class: Steep::Diagnostic::Signature::CyclicClassAliasDefinitionError

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

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#detail_lines, #diagnostic_code, #path

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(decl:) ⇒ CyclicClassAliasDefinitionError

Returns a new instance of CyclicClassAliasDefinitionError.



455
456
457
458
# File 'lib/steep/diagnostic/signature.rb', line 455

def initialize(decl:)
  @decl = decl
  super(location: decl.location&.[](:new_name))
end

Instance Attribute Details

#declObject (readonly)

Returns the value of attribute decl.



453
454
455
# File 'lib/steep/diagnostic/signature.rb', line 453

def decl
  @decl
end

Instance Method Details

#header_lineObject



460
461
462
# File 'lib/steep/diagnostic/signature.rb', line 460

def header_line
  "#{decl.new_name} is a cyclic definition"
end