Class: Pal::Handler::Manager
- Inherits:
-
Object
- Object
- Pal::Handler::Manager
- Includes:
- Log
- Defined in:
- lib/pal/handler/manager.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
Returns the value of attribute handler.
Instance Method Summary collapse
-
#initialize(handler) ⇒ Manager
constructor
A new instance of Manager.
- #process_runbook(runbook) ⇒ Array, Hash
Methods included from Log
#log_debug, #log_error, #log_info, #log_warn
Constructor Details
Instance Attribute Details
#handler ⇒ Object
Returns the value of attribute handler.
8 9 10 |
# File 'lib/pal/handler/manager.rb', line 8 def handler @handler end |
Instance Method Details
#process_runbook(runbook) ⇒ Array, Hash
19 20 21 22 23 24 25 26 27 |
# File 'lib/pal/handler/manager.rb', line 19 def process_runbook(runbook) Pal.logger.info("Beginning execution of playbook ...") ctx = @handler.process_runbook log_info "No exporter defined." unless runbook.exporter log_info "No candidates found." unless ctx.candidates.size.positive? runbook.exporter.perform_export(ctx) end |