Class: PuppetGenerator::Middleware::ApplyExportFilters
- Inherits:
-
Object
- Object
- PuppetGenerator::Middleware::ApplyExportFilters
- Defined in:
- lib/puppet_generator/middleware/apply_export_filters.rb
Instance Method Summary collapse
- #call(task) ⇒ Object
-
#initialize(app) ⇒ ApplyExportFilters
constructor
A new instance of ApplyExportFilters.
Constructor Details
#initialize(app) ⇒ ApplyExportFilters
Returns a new instance of ApplyExportFilters.
5 6 7 |
# File 'lib/puppet_generator/middleware/apply_export_filters.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
#call(task) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/puppet_generator/middleware/apply_export_filters.rb', line 9 def call(task) PuppetGenerator.logger.debug(self.class.name){ "Filter the output with filter \"#{task.[:requested_export_filter].join(", ")}\"" } task.body = apply_filters(task.[:requested_export_filter], task.body) PuppetGenerator.logger.debug(self.class.name) { "Count output lines: #{task.body.size}" } @app.call(task) end |