Sha256: b1d7fb4b235e113717f81669b02bb2c068d92d126a93608b986e3ad9f1dcdcd1

Contents?: true

Size: 280 Bytes

Versions: 10

Compression:

Stored size: 280 Bytes

Contents

module Shog
  module Extensions
    module Colored
      extend self

      # Removes any ASCII color encoding
      def uncolorize
        # http://refiddle.com/18rj
        gsub /\e\[\d+(;\d+)*m/, ''
      end


    end
  end
end

String.send :include, Shog::Extensions::Colored

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shog-0.2.1 lib/shog/extensions.rb
shog-0.2.0 lib/shog/extensions.rb
shog-0.1.9 lib/shog/extensions.rb
shog-0.1.8 lib/shog/extensions.rb
shog-0.1.7 lib/shog/extensions.rb
shog-0.1.6 lib/shog/extensions.rb
shog-0.1.5 lib/shog/extensions.rb
shog-0.1.4 lib/shog/extensions.rb
shog-0.1.3 lib/shog/extensions.rb
shog-0.1.2 lib/shog/extensions.rb