class GiteePack::Logger
Attributes
history[RW]
Public Class Methods
new()
click to toggle source
# File lib/gitee_pack/logger.rb, line 5 def initialize @history = [] end
Public Instance Methods
debug(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 9 def debug(content) logging content end
error(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 21 def error(content) logging "\033[31m#{content}\033[0m" end
info(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 13 def info(content) logging "\033[36m#{content}\033[0m" end
success(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 25 def success(content) logging "\033[32m#{content}\033[0m" end
warn(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 17 def warn(content) logging "\033[33m#{content}\033[0m" end
Private Instance Methods
logging(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 31 def logging(content) set_history content puts content end
set_history(content)
click to toggle source
# File lib/gitee_pack/logger.rb, line 36 def set_history(content) @history << content end