Sha256: b5f3ab8d7a15ca6d88920ffe01691c89697502facbb11da36a5c262afdf1ebdc

Contents?: true

Size: 246 Bytes

Versions: 24

Compression:

Stored size: 246 Bytes

Contents

# encoding: utf-8

module Nanoc::CLI::StreamCleaners

  # Removes ANSI color escape sequences.
  class ANSIColors < Abstract

    # @see Nanoc::CLI::StreamCleaners::Abstract#clean
    def clean(s)
      s.gsub(/\e\[.+?m/, '')
    end

  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
nanoc-3.4.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-3.4.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-3.4.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-3.4.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb