Class: Steep::Diagnostic::Ruby::MethodDefinitionMissing
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#missing_method ⇒ Object
readonly
Returns the value of attribute missing_method.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, module_name:, kind:, missing_method:) ⇒ MethodDefinitionMissing
constructor
A new instance of MethodDefinitionMissing.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, module_name:, kind:, missing_method:) ⇒ MethodDefinitionMissing
Returns a new instance of MethodDefinitionMissing.
572 573 574 575 576 577 |
# File 'lib/steep/diagnostic/ruby.rb', line 572 def initialize(node:, module_name:, kind:, missing_method:) super(node: node, location: node.children[0].loc.expression) @module_name = module_name @kind = kind @missing_method = missing_method end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
569 570 571 |
# File 'lib/steep/diagnostic/ruby.rb', line 569 def kind @kind end |
#missing_method ⇒ Object (readonly)
Returns the value of attribute missing_method.
570 571 572 |
# File 'lib/steep/diagnostic/ruby.rb', line 570 def missing_method @missing_method end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
568 569 570 |
# File 'lib/steep/diagnostic/ruby.rb', line 568 def module_name @module_name end |
Instance Method Details
#header_line ⇒ Object
579 580 581 582 583 584 585 586 587 |
# File 'lib/steep/diagnostic/ruby.rb', line 579 def header_line method_name = case kind when :module ".#{missing_method}" when :instance "##{missing_method}" end "Cannot find implementation of method `#{module_name}#{method_name}`" end |