Sha256: b6f4abdf36b59c9cbcb01ff9ff9270b65dbd57542d7b22d800b7dd8fd21ca350

Contents?: true

Size: 946 Bytes

Versions: 11

Compression:

Stored size: 946 Bytes

Contents

module AeEasy
  module Core
    module Plugin
      module ExecutorBehavior
        include AeEasy::Core::Plugin::ContextIntegrator

        # Enqueue a single/multiple pages for fetch. Analog to `save_pages`.
        #
        # @param [Array,Hash] object Pages to save being Hash when single and
        #   Array when many.
        #
        # @note Instance must implement:
        #   * `save_pages(pages)`
        def enqueue object
          object = [object] unless object.is_a? Array
          save_pages object
        end

        # Save a single/multiple outputs. Analog to `save_outputs`.
        #
        # @param [Array,Hash] object Outputs to save being Hash when single and Array when many.
        #
        # @note Instance must implement:
        #   * `save_outputs(outputs)`
        def save object
          object = [object] unless object.is_a? Array
          save_outputs object
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ae_easy-core-0.2.0 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.9 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.8 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.7 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.6 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.5 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.4 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.3 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.2 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.1 lib/ae_easy/core/plugin/executor_behavior.rb
ae_easy-core-0.1.0 lib/ae_easy/core/plugin/executor_behavior.rb