Sha256: 362e68d3c9ce770d6539c4ed561781ecf8a4bf723fba88ef5400032a3db8471e
Contents?: true
Size: 637 Bytes
Versions: 2
Compression:
Stored size: 637 Bytes
Contents
module MotionTable class Console NAME = "MotionTable::Console" DEFAULT_COLOR = [ '', '' ] RED_COLOR = [ "\e[0;31m", "\e[0m" ] # Must be in double quotes GREEN_COLOR = [ "\e[0;32m", "\e[0m" ] PURPLE_COLOR = [ "\e[0;35m", "\e[0m" ] class << self def log(obj, actionNotImplemented:action) log " actionNotImplemented -- the action :#{action} is not implemented in #{obj.class.to_s}", withColor: RED_COLOR end def log(log, withColor:color) puts color[0] + NAME + log + color[1] end def log(log) log(log, withColor: DEFAULT_COLOR) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
motion-table-0.1.4 | lib/motion-table/console.rb |
motion-table-0.1.3 | lib/motion-table/console.rb |