class RuboCop::Cop::Layout::EndAlignment
def alignment_node_for_variable_style(node)
def alignment_node_for_variable_style(node) if node.type?(:case, :case_match) && node.argument? && same_line?(node, node.parent) return node.parent end assignment = assignment_or_operator_method(node) if assignment && !line_break_before_keyword?(assignment.source_range, node) assignment else # Fall back to 'keyword' style if this node is not on the RHS of an # assignment, or if it is but there's a line break between LHS and # RHS. node end end