Added options to error/debug UI method

This commit is contained in:
Thibaud Guillaume-Gentil 2010-11-11 11:02:29 +01:00
parent 0e88105faa
commit eebd74b253

View File

@ -9,12 +9,14 @@ module Guard
end end
end end
def error(message) def error(message, options = {})
reset_line if options[:reset]
puts "ERROR: #{message}" puts "ERROR: #{message}"
end end
def debug(message) def debug(message, options = {})
unless ENV["GUARD_ENV"] == "test" unless ENV["GUARD_ENV"] == "test"
reset_line if options[:reset]
puts "DEBUG: #{message}" if ::Guard.options && ::Guard.options[:debug] puts "DEBUG: #{message}" if ::Guard.options && ::Guard.options[:debug]
end end
end end