Sha256: 3f7782b503226a4beb33955be4fb7bb574f26cf38ff0acba48ea3c94e5da5875

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

module GitCommands
  module Colorize
    CODES = {
      :red => 31,
      :green => 32,
      :yellow => 33,
      :blue => 34,
      :magenta => 35,
      :cyan => 36,
      :grey => 37
    }

  end
end

String.instance_eval do
  GitCommands::Colorize::CODES.each do |message, code|
    define_method(message) do
      "\e[#{code}m#{self}\e[0m"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_commands-2.1.0 lib/git_commands/colorize.rb