Class: Nanoc::CLI::StreamCleaners::Abstract Abstract Private

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/cli/stream_cleaners/abstract.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class is abstract.

Subclasses must implement #clean

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.

Direct Known Subclasses

ANSIColors, UTF8

Instance Method Summary collapse

Instance Method Details

#clean(str) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a cleaned version of the given string.

Parameters:

  • str (String)

    The string to clean

Returns:

  • (String)

    The cleaned string

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/nanoc/cli/stream_cleaners/abstract.rb', line 17

def clean(str)
  raise NotImplementedError, 'Subclasses of Nanoc::CLI::StreamCleaners::Abstract must implement #clean'
end