Class: Steep::Diagnostic::Ruby::MethodDefinitionInUndeclaredModule
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(method_name:, node:) ⇒ MethodDefinitionInUndeclaredModule
constructor
A new instance of MethodDefinitionInUndeclaredModule.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(method_name:, node:) ⇒ MethodDefinitionInUndeclaredModule
Returns a new instance of MethodDefinitionInUndeclaredModule.
1043 1044 1045 1046 |
# File 'lib/steep/diagnostic/ruby.rb', line 1043 def initialize(method_name:, node:) @method_name = method_name super(node: node, location: (_ = node.loc).name) end |
Instance Attribute Details
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
1041 1042 1043 |
# File 'lib/steep/diagnostic/ruby.rb', line 1041 def method_name @method_name end |
Instance Method Details
#header_line ⇒ Object
1048 1049 1050 |
# File 'lib/steep/diagnostic/ruby.rb', line 1048 def header_line "Method `#{method_name}` is defined in undeclared module" end |