Sha256: 8738cb55f7696bd72c66137dc6a91558d5e00afed44f5429313135303e6a55f9

Contents?: true

Size: 532 Bytes

Versions: 14

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

module StatsLite
  module Log
    class << self
      def colorize(str, color_code)
        "\e[#{color_code}m#{str}\e[0m"
      end

      def red(str)
        colorize(str, 31)
      end

      def green(str)
        colorize(str, 32)
      end

      def yellow(str)
        colorize(str, 33)
      end

      def blue(str)
        colorize(str, 34)
      end

      def pink(str)
        colorize(str, 35)
      end

      def light_blue(str)
        colorize(str, 36)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stats_lite-0.8.1 lib/stats_lite/log.rb
stats_lite-0.8.0 lib/stats_lite/log.rb
stats_lite-0.7.2 lib/stats_lite/log.rb
stats_lite-0.7.1 lib/stats_lite/log.rb
stats_lite-0.7.0 lib/stats_lite/log.rb
stats_lite-0.6.2 lib/stats_lite/log.rb
stats_lite-0.6.1 lib/stats_lite/log.rb
stats_lite-0.6.0 lib/stats_lite/log.rb
stats_lite-0.5.4 lib/stats_lite/log.rb
stats_lite-0.5.3 lib/stats_lite/log.rb
stats_lite-0.5.2 lib/stats_lite/log.rb
stats_lite-0.5.1 lib/stats_lite/log.rb
stats_lite-0.5.0 lib/stats_lite/log.rb
stats_lite-0.1.0 lib/stats_lite/log.rb