class RuboCop::Cop::IfThenCorrector
def replacement(node = if_node, indentation = nil)
def replacement(node = if_node, indentation = nil) indentation = ' ' * node.source_range.column if indentation.nil? if_branch_source = node.if_branch&.source || 'nil' elsif_indentation = indentation if node.respond_to?(:elsif?) && node.elsif? if_branch = <<~RUBY #{elsif_indentation}#{node.keyword} #{node.condition.source} #{indentation}#{branch_body_indentation}#{if_branch_source} RUBY else_branch = rewrite_else_branch(node.else_branch, indentation) if_branch + else_branch end