Class: Steep::Diagnostic::Ruby::UnknownInstanceVariable
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, name:) ⇒ UnknownInstanceVariable
constructor
A new instance of UnknownInstanceVariable.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, name:) ⇒ UnknownInstanceVariable
Returns a new instance of UnknownInstanceVariable.
636 637 638 639 |
# File 'lib/steep/diagnostic/ruby.rb', line 636 def initialize(node:, name:) super(node: node, location: node.loc.name) # steep:ignore NoMethod @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
634 635 636 |
# File 'lib/steep/diagnostic/ruby.rb', line 634 def name @name end |
Instance Method Details
#header_line ⇒ Object
641 642 643 |
# File 'lib/steep/diagnostic/ruby.rb', line 641 def header_line "Cannot find the declaration of instance variable: `#{name}`" end |