Class: Strelka::CMS::PageFilter

Inherits:
Object
  • Object
show all
Extended by:
Loggability, Pluggability
Defined in:
lib/strelka/cms/pagefilter.rb

Overview

An abstract base class for page filters in the Strelka CMS.

A page filter replaces one or more placeholders with generated or altered content.

Direct Known Subclasses

AutoIndex, Cleanup, Editorial, Example, Strip, Textile

Instance Method Summary collapse

Instance Method Details

#export_resources(output_dir) ⇒ Object

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



39
40
41
# File 'lib/strelka/cms/pagefilter.rb', line 39

def export_resources( output_dir )
	# No-op by default
end

#nameObject

I N S T A N C E M E T H O D S



32
33
34
35
# File 'lib/strelka/cms/pagefilter.rb', line 32

def name
	self.log.warn "#name called from: \n%s" % [ caller(1).join("\n") ]
	"pagefilter"
end

#process(source, page, index) ⇒ Object

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

Raises:

  • (NotImplementedError)


45
46
47
48
# File 'lib/strelka/cms/pagefilter.rb', line 45

def process( source, page, index )
	raise NotImplementedError,
		"%s does not implement the #process method" % [ self.class.name ]
end