Class: PuppetGenerator::Middleware::ExecuteActions

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_generator/middleware/execute_actions.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ ExecuteActions

Returns a new instance of ExecuteActions.



5
6
7
# File 'lib/puppet_generator/middleware/execute_actions.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(task) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/puppet_generator/middleware/execute_actions.rb', line 9

def call(task)
  PuppetGenerator.logger.debug(self.class.name){ "Execute action \"#{task.meta[:requested_actions].join(", ")}\" on output." }

  task.body = execute_actions( task.meta[:requested_actions] , task )

  @app.call(task)
end