Class: Steep::Diagnostic::Signature::NonregularTypeAlias

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:, nonregular_type:, location:) ⇒ NonregularTypeAlias

Returns a new instance of NonregularTypeAlias.



414
415
416
417
418
# File 'lib/steep/diagnostic/signature.rb', line 414

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

Instance Attribute Details

#nonregular_typeObject (readonly)

Returns the value of attribute nonregular_type.



412
413
414
# File 'lib/steep/diagnostic/signature.rb', line 412

def nonregular_type
  @nonregular_type
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



411
412
413
# File 'lib/steep/diagnostic/signature.rb', line 411

def type_name
  @type_name
end

Instance Method Details

#header_lineObject



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

def header_line
  "Type alias #{type_name} is defined *non-regular*: #{nonregular_type}"
end