Class: Steep::Diagnostic::Ruby::UnexpectedDynamicMethod
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#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:, method_name:) ⇒ UnexpectedDynamicMethod
constructor
A new instance of UnexpectedDynamicMethod.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, module_name:, method_name:) ⇒ UnexpectedDynamicMethod
Returns a new instance of UnexpectedDynamicMethod.
594 595 596 597 598 |
# File 'lib/steep/diagnostic/ruby.rb', line 594 def initialize(node:, module_name:, method_name:) super(node: node, location: node.children[0].loc.expression) @module_name = module_name @method_name = method_name end |
Instance Attribute Details
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
592 593 594 |
# File 'lib/steep/diagnostic/ruby.rb', line 592 def method_name @method_name end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
591 592 593 |
# File 'lib/steep/diagnostic/ruby.rb', line 591 def module_name @module_name end |
Instance Method Details
#header_line ⇒ Object
600 601 602 |
# File 'lib/steep/diagnostic/ruby.rb', line 600 def header_line "@dynamic annotation contains unknown method name `#{method_name}`" end |