Sha256: 65059688eba76a041436b269753e2b4cf701005ea06cf4329c49b3d5cd46b19c

Contents?: true

Size: 238 Bytes

Versions: 2

Compression:

Stored size: 238 Bytes

Contents

module CliSpinnable
  class Line
    module ColourableString
      refine String do
        def red
          "\e[31m#{self}\e[0m"
        end

        def green
          "\e[0;32;49m#{self}\e[0m"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cli_spinnable-0.2 lib/cli_spinnable/line/colourable_string.rb
cli_spinnable-0.1 lib/cli_spinnable/line/colourable_string.rb