Class: Jsus::Util::PostProcessor::Base
- Inherits:
-
Object
- Object
- Jsus::Util::PostProcessor::Base
- Includes:
- Mixins::OperatesOnSources
- Defined in:
- lib/jsus/util/post_processor/base.rb
Overview
Base class for post-processing routines. Post-processors are non-mutating boxes that accept a collection of SourceFile-s on input and return a collection of SourceFiles on output.
Post-processing is not mutating the arguments, but dupes them instead
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(pool_or_array_or_container = []) ⇒ Base
constructor
Constructor accepts pool or array or container and adds every file to its source files set.
-
#process(options = {}) ⇒ Array
abstract
Processes input source files, return a resulting collection.
Methods included from Mixins::OperatesOnSources
Constructor Details
#initialize(pool_or_array_or_container = []) ⇒ Base
Constructor accepts pool or array or container and adds every file to its source files set.
16 17 18 |
# File 'lib/jsus/util/post_processor/base.rb', line 16 def initialize(pool_or_array_or_container = []) self.source_files = pool_or_array_or_container end |
Instance Method Details
#process(options = {}) ⇒ Array
This method is abstract.
Override in subclasses
Note:
This method should not mutate input sources
Processes input source files, return a resulting collection
26 27 28 |
# File 'lib/jsus/util/post_processor/base.rb', line 26 def process( = {}) raise NotImplementedError, "override #process in subclasses" end |