Sha256: 709b0e032bcc38a655b994552a568013aef1277b89cd65c3d3d856f1f0be4921

Contents?: true

Size: 551 Bytes

Versions: 22

Compression:

Stored size: 551 Bytes

Contents

module Picky

  module Sources

    # Source wrappers can be used to rewrite data before it goes into the index.
    #
    # For example if you want to normalize data.
    #
    module Wrappers # :nodoc:all

      class Base

        attr_reader :source

        # Wraps an indexing category.
        #
        def initialize source
          @source = source
        end

        # Default is delegation for all methods
        #
        delegate :harvest, :connect_backend, :take_snapshot, :key_format, :to => :source

      end

    end

  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
picky-3.0.0.pre2 lib/picky/sources/wrappers/base.rb
picky-3.0.0.pre1 lib/picky/sources/wrappers/base.rb