Initial commit.
commit
f7cd4c4d13
|
@ -0,0 +1,34 @@
|
|||
require "colorize"
|
||||
|
||||
class Weird::Base
|
||||
# FIXME: Use log files.
|
||||
# FIXME: def log(), that puts stuff as-is in the logs.
|
||||
|
||||
def debug(text)
|
||||
STDERR.puts ":: #{text}".colorize(:cyan)
|
||||
STDERR.flush
|
||||
end
|
||||
def info(text)
|
||||
STDOUT
|
||||
.<<(":: ".colorize(:blue))
|
||||
.<<(text.colorize(:white))
|
||||
.<<("\n")
|
||||
STDOUT.flush
|
||||
end
|
||||
def title(text)
|
||||
STDOUT
|
||||
.<<("|> ".colorize(:blue).bright)
|
||||
.<<(text.colorize(:white).bright)
|
||||
.<<("\n")
|
||||
STDOUT.flush
|
||||
end
|
||||
def warning(text)
|
||||
STDERR.puts ":: #{text}".colorize(:yellow)
|
||||
STDERR.flush
|
||||
end
|
||||
def error(text)
|
||||
STDERR.puts "!! #{text}".colorize(:red)
|
||||
STDERR.flush
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue