Hoe::ManualGen::

PageFilter

class
Superclass
Object
Included Modules
Singleton
Hoe::ManualGen::Logging

An abstract filter class for manual content transformation.

Attributes

derivatives[R]

Public Class Methods

anchor
inherited( subclass )

Inheritance callback – keep track of all inheriting classes for later.

# File lib/hoe/manualgen.rb, line 489
def self::inherited( subclass )
        key = subclass.name.
                sub( /^.*::/, '' ).
                gsub( /[^[:alpha:]]+/, '_' ).
                downcase.
                sub( /filter$/, '' )

        self.derivatives[ key ] = subclass
        self.derivatives[ key.to_sym ] = subclass

        super
end

Public Instance Methods

anchor
export_resources( output_dir )

Export any static resources required by this filter to the given output_dir.

# File lib/hoe/manualgen.rb, line 504
def export_resources( output_dir )
        # No-op by default
end
anchor
process( source, page, metadata )

Process the page's source with the filter and return the altered content.

# File lib/hoe/manualgen.rb, line 510
def process( source, page, metadata )
        raise NotImplementedError,
                "%s does not implement the #process method" % [ self.class.name ]
end