From 93b289c353b2ca987a26f7af40ba3fa36a2a3463 Mon Sep 17 00:00:00 2001 From: passbe Date: Fri, 2 Sep 2011 23:53:53 +0000 Subject: [PATCH] Created print_over to allow for printing over the same line git-svn-id: https://beef.googlecode.com/svn/trunk@1255 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- core/ruby/print.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/ruby/print.rb b/core/ruby/print.rb index a4a047d84..7921041d8 100644 --- a/core/ruby/print.rb +++ b/core/ruby/print.rb @@ -67,3 +67,11 @@ def print_more(s) end end end + +# +# Function used to print over the current line +# +def print_over(s) + time = Time.now.localtime.strftime("[%k:%M:%S]") + print "\r#{time}"+"[*]".blue+" #{s}" +end