class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes
def need_heredoc_delimiter_quotes?(node)
def need_heredoc_delimiter_quotes?(node) heredoc_delimiter = node.source.delete(heredoc_type(node)) return true unless heredoc_delimiter.start_with?("'", '"') node.loc.heredoc_end.source.strip.match?(/\W/) || node.loc.heredoc_body.source.match?(STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN) end