class Rufo::Formatter
def flush_heredocs
def flush_heredocs if comment? write_space unless @output[-1] == " " write current_token_value.rstrip next_token write_line if @heredocs.last[1] write_indent(next_indent) end end printed = false until @heredocs.empty? heredoc, tilde = @heredocs.first @heredocs.shift @current_heredoc = [heredoc, tilde] visit_string_literal_end(heredoc) @current_heredoc = nil printed = true end end