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.7.9 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.8 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.7 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.6 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.5 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.7.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.6.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.6.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.6.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.6.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.6.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.5.4 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.5.3 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.5.2 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.5.1 lib/nanoc/cli/stream_cleaners/ansi_colors.rb
nanoc-4.5.0 lib/nanoc/cli/stream_cleaners/ansi_colors.rb