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.



420
421
422
423
# File 'lib/steep/diagnostic/signature.rb', line 420

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

Instance Attribute Details

#declObject (readonly)

Returns the value of attribute decl.



418
419
420
# File 'lib/steep/diagnostic/signature.rb', line 418

def decl
  @decl
end

Instance Method Details

#header_lineObject



425
426
427
# File 'lib/steep/diagnostic/signature.rb', line 425

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