lib/protest/utils/colorful_output.rb
# Print the string followed by a newline to whatever IO stream is defined in
# the method #stream using the correct color depending on the state passed.
Print the string followed by a newline to whatever IO stream is defined in
the method #stream using the correct color depending on the state passed.
Print the string followed by a newline to whatever IO stream is defined in the method #stream using the correct color depending on the state passed .
def puts(string=nil, state=:normal)
        if string.nil? 
          stream.puts
        else
          stream.puts colorize(string, state)
        end
      end
def puts ( string = nil , state = :normal ) if string . nil? stream . puts else stream . puts colorize ( string , state ) end end
Print the string followed by a newline to whatever IO stream is defined in
the method #stream using the correct color depending on the state passed.
Print the string followed by a newline to whatever IO stream is defined in the method #stream using the correct color depending on the state passed .
# calling IO#puts with nil is not the same as with no args
string
state