Sha256: 889a43b3152f2720668ddd7dc7810e3b86b4fe7b17f2097a61837c87bbe4ae15

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

module MotionTable
  class Console
    NAME = "MotionTable::Console"
    DEFAULT_COLOR = [ '', '' ]
    RED_COLOR = [ "\e[0;31m", "\e[0m" ] # Must be in double quotes

    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

1 entries across 1 versions & 1 rubygems

Version Path
motion-table-0.1.1 lib/motion-table/console.rb