Class: Steep::Diagnostic::Ruby::RequiredBlockMissing
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, method_type:) ⇒ RequiredBlockMissing
constructor
A new instance of RequiredBlockMissing.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, method_type:) ⇒ RequiredBlockMissing
Returns a new instance of RequiredBlockMissing.
315 316 317 318 |
# File 'lib/steep/diagnostic/ruby.rb', line 315 def initialize(node:, method_type:) super(node: node, location: (node.type == :super || node.type == :zsuper) ? node.loc.keyword : node.loc.selector) # steep:ignore NoMethod @method_type = method_type end |
Instance Attribute Details
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
313 314 315 |
# File 'lib/steep/diagnostic/ruby.rb', line 313 def method_type @method_type end |
Instance Method Details
#header_line ⇒ Object
320 321 322 |
# File 'lib/steep/diagnostic/ruby.rb', line 320 def header_line "The method cannot be called without a block" end |