Module: AeEasy::Core::Plugin::ExecutorBehavior

Includes:
ContextIntegrator
Included in:
Executor, ParserBehavior, SeederBehavior
Defined in:
lib/ae_easy/core/plugin/executor_behavior.rb

Instance Attribute Summary

Attributes included from ContextIntegrator

#context

Instance Method Summary collapse

Methods included from ContextIntegrator

#initialize_hook_core_context_integrator, #mock_context

Instance Method Details

#enqueue(object) ⇒ Object

Note:

Instance must implement:

  • `save_pages(pages)`

Enqueue a single/multiple pages for fetch. Analog to `save_pages`.

Parameters:

  • object (Array, Hash)

    Pages to save being Hash when single and Array when many.



14
15
16
17
# File 'lib/ae_easy/core/plugin/executor_behavior.rb', line 14

def enqueue object
  object = [object] unless object.is_a? Array
  save_pages object
end

#save(object) ⇒ Object

Note:

Instance must implement:

  • `save_outputs(outputs)`

Save a single/multiple outputs. Analog to `save_outputs`.

Parameters:

  • object (Array, Hash)

    Outputs to save being Hash when single and Array when many.



25
26
27
28
# File 'lib/ae_easy/core/plugin/executor_behavior.rb', line 25

def save object
  object = [object] unless object.is_a? Array
  save_outputs object
end