Class: Steep::Diagnostic::Ruby::UnknownConstant
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Base
Instance Method Summary collapse
- #class! ⇒ Object
- #header_line ⇒ Object
-
#initialize(node:, name:) ⇒ UnknownConstant
constructor
A new instance of UnknownConstant.
- #module! ⇒ Object
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, name:) ⇒ UnknownConstant
Returns a new instance of UnknownConstant.
609 610 611 612 613 |
# File 'lib/steep/diagnostic/ruby.rb', line 609 def initialize(node:, name:) super(node: node, location: node.loc.name) # steep:ignore NoMethod @name = name @kind = :constant end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
607 608 609 |
# File 'lib/steep/diagnostic/ruby.rb', line 607 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
606 607 608 |
# File 'lib/steep/diagnostic/ruby.rb', line 606 def name @name end |
Instance Method Details
#class! ⇒ Object
615 616 617 618 |
# File 'lib/steep/diagnostic/ruby.rb', line 615 def class! @kind = :class self end |
#header_line ⇒ Object
625 626 627 |
# File 'lib/steep/diagnostic/ruby.rb', line 625 def header_line "Cannot find the declaration of #{kind}: `#{name}`" end |
#module! ⇒ Object
620 621 622 623 |
# File 'lib/steep/diagnostic/ruby.rb', line 620 def module! @kind = :module self end |