class RuboCop::Cop::Layout::LineContinuationSpacing
def ignored_literal_ranges(ast)
def ignored_literal_ranges(ast) # which lines start inside a string literal? return [] if ast.nil? ast.each_node(:str, :dstr, :array).with_object(Set.new) do |literal, ranges| loc = literal.location if literal.array_type? next unless literal.percent_literal? ranges << loc.expression elsif literal.heredoc? ranges << loc.heredoc_body elsif loc.respond_to?(:begin) && loc.begin ranges << loc.expression end end end