Sha256: 3af815c1e4db6ecef5cc40dbd35a7c5a18f2a521171b605b90a49289bb335f51

Contents?: true

Size: 625 Bytes

Versions: 15

Compression:

Stored size: 625 Bytes

Contents

# encoding: utf-8

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}
  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)
      raise NotImplementedError, "Subclasses of Nanoc::CLI::StreamCleaners::Abstract must implement #clean"
    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.6.7 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.6 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.5 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.4 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.3 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.2 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.1 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.6.0 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.5.0 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.5.0b2 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.5.0b1 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.4.3 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.4.2 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.4.1 lib/nanoc/cli/stream_cleaners/abstract.rb
nanoc-3.4.0 lib/nanoc/cli/stream_cleaners/abstract.rb