Class: Steep::Diagnostic::Signature::DuplicatedDeclaration

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(type_name:, location:) ⇒ DuplicatedDeclaration

Returns a new instance of DuplicatedDeclaration.



57
58
59
60
# File 'lib/steep/diagnostic/signature.rb', line 57

def initialize(type_name:, location:)
  super(location: location)
  @type_name = type_name
end

Instance Attribute Details

#type_nameObject (readonly)

Returns the value of attribute type_name.



55
56
57
# File 'lib/steep/diagnostic/signature.rb', line 55

def type_name
  @type_name
end

Instance Method Details

#header_lineObject



62
63
64
# File 'lib/steep/diagnostic/signature.rb', line 62

def header_line
  "Declaration of `#{type_name}` is duplicated"
end