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

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

Overview

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

- (String) clean(s)

Returns a cleaned version of the given string.

Parameters:

  • s (String)

    The string to clean

Returns:

  • (String)

    The cleaned string

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/nanoc/cli/stream_cleaners/abstract.rb', line 15

def clean(s) # rubocop:disable Lint/UnusedMethodArgument
  raise NotImplementedError, 'Subclasses of Nanoc::CLI::StreamCleaners::Abstract must implement #clean'
end