Class: Steep::Diagnostic::Ruby::UnknownGlobalVariable
- 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:) ⇒ UnknownGlobalVariable
constructor
A new instance of UnknownGlobalVariable.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, name:) ⇒ UnknownGlobalVariable
Returns a new instance of UnknownGlobalVariable.
649 650 651 652 |
# File 'lib/steep/diagnostic/ruby.rb', line 649 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.
647 648 649 |
# File 'lib/steep/diagnostic/ruby.rb', line 647 def name @name end |
Instance Method Details
#header_line ⇒ Object
654 655 656 |
# File 'lib/steep/diagnostic/ruby.rb', line 654 def header_line "Cannot find the declaration of global variable: `#{name}`" end |