class RuboCop::Cop::Style::RedundantStringEscape

def heredoc_with_disabled_interpolation?(node)

def heredoc_with_disabled_interpolation?(node)
  if heredoc?(node)
    node.source.end_with?("'")
  elsif node.parent&.dstr_type?
    heredoc_with_disabled_interpolation?(node.parent)
  else
    false
  end
end