class Rufo::Formatter

def check_heredocs_at_call_end(node)

def check_heredocs_at_call_end(node)
  printed = false
  until @heredocs.empty?
    scope, heredoc, tilde = @heredocs.first
    break unless scope.equal?(node)
    # Need to print a line between consecutive heredoc ends
    write_line if printed
    @heredocs.shift
    @current_heredoc = [heredoc, tilde]
    visit_string_literal_end(heredoc)
    @current_heredoc = nil
    printed          = true
  end
end