Sha256: afe33e1403a9ebb1fccf48304df3f1d59d8eaa936685f14ab7505429faed4102

Contents?: true

Size: 698 Bytes

Versions: 25

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module Nanoc::CLI::StreamCleaners
  # Superclass for all stream cleaners. Stream cleaners have a single method,
  # {#clean}, that takes a string and returns a cleaned string. Stream cleaners
  # can have state, so they can act as a FSM.
  #
  # @abstract Subclasses must implement {#clean}
  #
  # @api private
  class Abstract
    # Returns a cleaned version of the given string.
    #
    # @param [String] s The string to clean
    #
    # @return [String] The cleaned string
    def clean(s) # rubocop:disable Lint/UnusedMethodArgument
      raise NotImplementedError, 'Subclasses of Nanoc::CLI::StreamCleaners::Abstract must implement #clean'
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
nanoc-4.8.19 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.18 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.17 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.16 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.15 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.14 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.13 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.12 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.11 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.10 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.9 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.8 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.7 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.6 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.5 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.4 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.3 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.2 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.1 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-4.8.0 lib/nanoc/cli/stream_cleaners/abstract.rb