Class Nanoc::CLI::CleaningStream
In: lib/nanoc/cli/cleaning_stream.rb
Parent: Object

An output stream that passes output through stream cleaners. This can be used to strip ANSI color sequences, for instance.

Methods

<<   add_stream_cleaner   clean   close   exist?   exists?   flush   new   print   puts   remove_stream_cleaner   reopen   string   tell   tty?   winsize   winsize=   write  

Public Class methods

@param [IO, StringIO] stream The stream to wrap

Public Instance methods

@see IO#<<

Adds a stream cleaner for the given class to this cleaning stream. If the cleaning stream already has the given stream cleaner, nothing happens.

@param [Nanoc::CLI::StreamCleaners::Abstract] klass The class of the

  stream cleaner to add

@return [void]

@see IO#close

@see File#exist?

@see File.exists?

@see IO#flush

@see IO#print

@see IO#puts

Removes the stream cleaner for the given class from this cleaning stream. If the cleaning stream does not have the given stream cleaner, nothing happens.

@param [Nanoc::CLI::StreamCleaners::Abstract] klass The class of the

  stream cleaner to add

@return [void]

@see IO#reopen

@see StringIO#string

@see IO#tell

@see IO#tty?

@see IO.winsize

@see IO.winsize=

@see IO#write

Protected Instance methods

[Validate]