class RuboCop::Cop::Layout::BlockAlignment
def compute_do_source_line_column(node, end_loc)
def compute_do_source_line_column(node, end_loc) do_loc = node.loc.begin # Actually it's either do or {. # We've found that "end" is not aligned with the start node (which # can be a block, a variable assignment, etc). But we also allow # the "end" to be aligned with the start of the line where the "do" # is, which is a style some people use in multi-line chains of # blocks. match = /\S.*/.match(do_loc.source_line) indentation_of_do_line = match.begin(0) return unless end_loc.column != indentation_of_do_line || style == :start_of_line { source: match[0], line: do_loc.line, column: indentation_of_do_line } end