Sha256: fd65d11bf74d4b5a8226c408792bd8cf7c166eeb2ff4bbf8a6cad7e2eed64b40

Contents?: true

Size: 587 Bytes

Versions: 9

Compression:

Stored size: 587 Bytes

Contents

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 :backend, :category
      
      # Wraps an indexing category.
      #
      def initialize category
        @category = category
        @backend  = category.source
      end
      
      # Default is delegation for all methods
      #
      delegate :harvest, :connect_backend, :take_snapshot, :key_format, :to => :backend
      
    end
      
  end
  
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
picky-2.1.2 lib/picky/sources/wrappers/base.rb
picky-2.1.1 lib/picky/sources/wrappers/base.rb
picky-2.1.0 lib/picky/sources/wrappers/base.rb
picky-2.0.0 lib/picky/sources/wrappers/base.rb
picky-2.0.0.pre3 lib/picky/sources/wrappers/base.rb
picky-2.0.0.pre2 lib/picky/sources/wrappers/base.rb
picky-2.0.0.pre1 lib/picky/sources/wrappers/base.rb
picky-1.5.4 lib/picky/sources/wrappers/base.rb
picky-1.5.3 lib/picky/sources/wrappers/base.rb