Class: Steep::Diagnostic::Ruby::UnexpectedBlockGiven
- 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:) ⇒ UnexpectedBlockGiven
constructor
A new instance of UnexpectedBlockGiven.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, method_type:) ⇒ UnexpectedBlockGiven
Returns a new instance of UnexpectedBlockGiven.
301 302 303 304 305 |
# File 'lib/steep/diagnostic/ruby.rb', line 301 def initialize(node:, method_type:) loc = node.loc.begin.join(node.loc.end) # steep:ignore NoMethod super(node: node, location: loc) @method_type = method_type end |
Instance Attribute Details
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
299 300 301 |
# File 'lib/steep/diagnostic/ruby.rb', line 299 def method_type @method_type end |
Instance Method Details
#header_line ⇒ Object
307 308 309 |
# File 'lib/steep/diagnostic/ruby.rb', line 307 def header_line "The method cannot be called with a block" end |