Class: Steep::Diagnostic::Signature::InheritModuleError

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(super_class) ⇒ InheritModuleError

Returns a new instance of InheritModuleError.



374
375
376
377
# File 'lib/steep/diagnostic/signature.rb', line 374

def initialize(super_class)
  super(location: super_class.location)
  @super_class = super_class
end

Instance Attribute Details

#super_classObject (readonly)

Returns the value of attribute super_class.



372
373
374
# File 'lib/steep/diagnostic/signature.rb', line 372

def super_class
  @super_class
end

Instance Method Details

#header_lineObject



379
380
381
# File 'lib/steep/diagnostic/signature.rb', line 379

def header_line
  "Cannot inherit from a module `#{super_class.name}`"
end