module RuboCop::AST::NodePattern::MethodDefiner

def emit_lambda_code

def emit_lambda_code
  <<~RUBY
    return unless #{match_code}
    block ? #{emit_yield_capture(yield_with: 'block.call')} : (return #{emit_retval})
  RUBY
end