module Thor::Actions

def with_output_buffer(buf = "".dup) #:nodoc:

:nodoc:
def with_output_buffer(buf = "".dup) #:nodoc:
  raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen?
  old_buffer = output_buffer
  self.output_buffer = buf
  yield
  output_buffer
ensure
  self.output_buffer = old_buffer
end