Sha256: 7c5cb6a88fa2755ade84c5b32db1a2ed3beae2861a9fafaaf999b530f3ff84e1

Contents?: true

Size: 1.35 KB

Versions: 5

Compression:

Stored size: 1.35 KB

Contents

module DhEasy
  module Core
    module Plugin
      module Seeder
        include DhEasy::Core::Plugin::InitializeHook
        include DhEasy::Core::Plugin::SeederBehavior

        # Root input directory path.
        # @return [String]
        attr_accessor :root_input_dir

        # Referer to use on page seeding.
        # @return [String]
        attr_accessor :referer

        # Cookie to use on page seeing.
        # @return [String]
        attr_accessor :cookie

        # Hook to initialize seeder object.
        #
        # @param [Hash] opts ({}) Configuration options.
        # @option opts [String] :root_input_dir (nil) Root directory for inputs.
        # @option opts [String] :referer (nil) New pages referer, useful to dynamic setups.
        # @option opts [String] :cookie (nil) Cookie to use on seeded pages fetchs.
        def initialize_hook_core_seeder opts = {}
          @root_input_dir = opts[:root_input_dir]
          @referer = opts[:referer]
          @cookie = opts[:cookie]
        end

        # Initialize seeder and hooks.
        #
        # @param [Hash] opts ({}) Configuration options.
        #
        # @see DhEasy::Core::Plugin::ContextIntegrator#initialize_hook_core_context_integrator
        # @see #initialize_hook_core_seeder
        def initialize opts = {}
          initialize_hooks opts
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dh_easy-core-0.3.4 lib/dh_easy/core/plugin/seeder.rb
dh_easy-core-0.3.3 lib/dh_easy/core/plugin/seeder.rb
dh_easy-core-0.3.2 lib/dh_easy/core/plugin/seeder.rb
dh_easy-core-0.3.1 lib/dh_easy/core/plugin/seeder.rb
dh_easy-core-0.2.2 lib/dh_easy/core/plugin/seeder.rb