Class: Jade::Frontend::SemanticAnalysis::Error::VariableNotFound
- Defined in:
- lib/jade/frontend/semantic_analysis/error/variable_not_found.rb
Instance Attribute Summary collapse
-
#causes ⇒ Object
readonly
Returns the value of attribute causes.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(entry, span, name:, causes: []) ⇒ VariableNotFound
constructor
A new instance of VariableNotFound.
- #label ⇒ Object
- #message ⇒ Object
Methods inherited from Error
#candidates, #notes, #queried_name, #to_diagnostic
Constructor Details
#initialize(entry, span, name:, causes: []) ⇒ VariableNotFound
Returns a new instance of VariableNotFound.
8 9 10 11 12 |
# File 'lib/jade/frontend/semantic_analysis/error/variable_not_found.rb', line 8 def initialize(entry, span, name:, causes: []) @name = name @causes = causes super(entry:, span:) end |
Instance Attribute Details
#causes ⇒ Object (readonly)
Returns the value of attribute causes.
6 7 8 |
# File 'lib/jade/frontend/semantic_analysis/error/variable_not_found.rb', line 6 def causes @causes end |
Instance Method Details
#label ⇒ Object
18 19 20 |
# File 'lib/jade/frontend/semantic_analysis/error/variable_not_found.rb', line 18 def label "not found" end |
#message ⇒ Object
14 15 16 |
# File 'lib/jade/frontend/semantic_analysis/error/variable_not_found.rb', line 14 def "I cannot find a `#{@name}` variable" end |