Sha256: ca2e5cd268c5faca10a29bd461947af0c7fab4b9a61b8596dff7825da526e72b

Contents?: true

Size: 244 Bytes

Versions: 58

Compression:

Stored size: 244 Bytes

Contents

module Nanoc::CLI::StreamCleaners
  # Removes ANSI color escape sequences.
  #
  # @api private
  class ANSIColors < Abstract
    # @see Nanoc::CLI::StreamCleaners::Abstract#clean
    def clean(s)
      s.gsub(/\e\[.+?m/, '')
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
nanoc-4.4.7 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.6 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.5 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.4.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.8 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.7 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.6 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.5 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.3.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.2.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.2.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.2.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb