class SyntaxTree::Parser

def on_method_add_block(call, block)

Experimental RBS support (using type sampling data from the type_fusion project).

def on_method_add_block: (SyntaxTree::CallNode call, SyntaxTree::BlockNode block) -> untyped

This signature was generated using 4 samples from 1 application.

) -> Break | MethodAddBlock
Block block
(Break | Call | Command | CommandCall, Next) call,
on_method_add_block: (
:call-seq:
def on_method_add_block(call, block)
  location = call.location.to(block.location)
  case call
  when Break, Next, ReturnNode
    parts = call.arguments.parts
    node = parts.pop
    copied =
      node.copy(block: block, location: node.location.to(block.location))
    copied.comments.concat(call.comments)
    parts << copied
    call.copy(location: location)
  when Command, CommandCall
    node = call.copy(block: block, location: location)
    node.comments.concat(call.comments)
    node
  else
    MethodAddBlock.new(call: call, block: block, location: location)
  end
end