Class: Jade::Frontend::ForwardDeclaration::Error::BadImport

Inherits:
Error
  • Object
show all
Defined in:
lib/jade/frontend/forward_declaration/error/bad_import.rb

Instance Attribute Summary

Attributes inherited from Error

#entry, #span

Instance Method Summary collapse

Methods inherited from Error

#candidates, #label, #notes, #queried_name, #to_diagnostic

Constructor Details

#initialize(entry, span, name:, module_name:) ⇒ BadImport

Returns a new instance of BadImport.



6
7
8
9
10
# File 'lib/jade/frontend/forward_declaration/error/bad_import.rb', line 6

def initialize(entry, span, name:, module_name:)
  @name = name
  @module_name = module_name
  super(entry:, span:)
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/jade/frontend/forward_declaration/error/bad_import.rb', line 12

def message
  "The `#{@module_name}` module does not expose `#{@name}`"
end