Class: Strelka::CMS::PageFilter
- Inherits:
-
Object
- Object
- Strelka::CMS::PageFilter
- 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.
Instance Method Summary collapse
-
#export_resources(output_dir) ⇒ Object
Export any static resources required by this filter to the given
output_dir
. -
#name ⇒ Object
I N S T A N C E M E T H O D S.
-
#process(source, page, index) ⇒ Object
Process the
page
‘s source with the filter and return the altered content.
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 |
#name ⇒ Object
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.
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 |