class RuboCop::Cop::IfThenCorrector

def rewrite_else_branch(else_branch, indentation)

def rewrite_else_branch(else_branch, indentation)
  if else_branch.nil?
    'end'
  elsif else_branch.if_type? && else_branch.elsif?
    replacement(else_branch, indentation)
  else
    <<~RUBY.chomp
      #{indentation}else
      #{indentation}#{branch_body_indentation}#{else_branch.source}
      #{indentation}end
    RUBY
  end
end