Sha256: 2f777f9434ca2e461fd9541c759da880ec5fbeece2932179564fb0e4ecdb7c95

Contents?: true

Size: 322 Bytes

Versions: 4

Compression:

Stored size: 322 Bytes

Contents

module Degica
  module ANSI
    COLORS = {
      none: "\e[0m",
      yellow: "\e[1;33m",
      red: "\e[31m",
      white: "\e[3;1m"
    }

    class << self
      def clear_screen
        puts "\x1b[2J"
      end

      def highlight(word, color)
        COLORS[color] + word + COLORS[:none]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
degica-1.0.3 lib/degica/ansi.rb
degica-1.0.2 lib/degica/ansi.rb
degica-1.0.1 lib/degica/ansi.rb
degica-1.0.0 lib/degica/ansi.rb