Class: Steep::Diagnostic::Signature::RecursiveAlias

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(class_name:, names:, location:) ⇒ RecursiveAlias

Returns a new instance of RecursiveAlias.



174
175
176
177
178
# File 'lib/steep/diagnostic/signature.rb', line 174

def initialize(class_name:, names:, location:)
  super(location: location)
  @class_name = class_name
  @names = names
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



171
172
173
# File 'lib/steep/diagnostic/signature.rb', line 171

def class_name
  @class_name
end

#namesObject (readonly)

Returns the value of attribute names.



172
173
174
# File 'lib/steep/diagnostic/signature.rb', line 172

def names
  @names
end

Instance Method Details

#header_lineObject



180
181
182
# File 'lib/steep/diagnostic/signature.rb', line 180

def header_line
  "Circular method alias is detected in `#{class_name}`: #{names.join(" -> ")}"
end