lib/picky/sources/wrappers/base.rb in picky-2.1.2 vs lib/picky/sources/wrappers/base.rb in picky-2.2.0
- old
+ new
@@ -1,28 +1,27 @@
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
-
+
+ attr_reader :source
+
# Wraps an indexing category.
#
- def initialize category
- @category = category
- @backend = category.source
+ def initialize source
+ @source = source
end
-
+
# Default is delegation for all methods
#
- delegate :harvest, :connect_backend, :take_snapshot, :key_format, :to => :backend
-
+ delegate :harvest, :connect_backend, :take_snapshot, :key_format, :to => :source
+
end
-
+
end
-
+
end
\ No newline at end of file