Class: Steep::Diagnostic::Signature::MixinClassError

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

Returns a new instance of MixinClassError.



316
317
318
319
320
# File 'lib/steep/diagnostic/signature.rb', line 316

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

Instance Attribute Details

#memberObject (readonly)

Returns the value of attribute member.



313
314
315
# File 'lib/steep/diagnostic/signature.rb', line 313

def member
  @member
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



314
315
316
# File 'lib/steep/diagnostic/signature.rb', line 314

def type_name
  @type_name
end

Instance Method Details

#header_lineObject



322
323
324
# File 'lib/steep/diagnostic/signature.rb', line 322

def header_line
  "Cannot #{mixin_name} a class `#{member.name}` in the definition of `#{type_name}`"
end