Class: Jade::Frontend::SemanticAnalysis::Error::ConstantNotCallable
- Defined in:
- lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(entry, span, name:) ⇒ ConstantNotCallable
constructor
A new instance of ConstantNotCallable.
- #label ⇒ Object
- #message ⇒ Object
Methods inherited from Error
#candidates, #notes, #queried_name, #to_diagnostic
Constructor Details
#initialize(entry, span, name:) ⇒ ConstantNotCallable
Returns a new instance of ConstantNotCallable.
6 7 8 9 |
# File 'lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb', line 6 def initialize(entry, span, name:) @name = name super(entry:, span:) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb', line 11 def name @name end |
Instance Method Details
#label ⇒ Object
17 18 19 |
# File 'lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb', line 17 def label "not callable" end |
#message ⇒ Object
13 14 15 |
# File 'lib/jade/frontend/semantic_analysis/error/constant_not_callable.rb', line 13 def "`#{name}` is a value, not a function — write `#{name}`, not `#{name}()`" end |