class Rufo::Formatter

def check_heredocs_in_literal_elements(is_last, wrote_comma)

def check_heredocs_in_literal_elements(is_last, wrote_comma)
  if (newline? || comment?) && !@heredocs.empty?
    if is_last && trailing_commas
      write "," unless wrote_comma
      wrote_comma = true
    end
    flush_heredocs
  end
  wrote_comma
end