lib/picky/indexes.rb in picky-4.12.1 vs lib/picky/indexes.rb in picky-4.12.2

- old
+ new

@@ -1,25 +1,30 @@ module Picky # Holds all indexes and provides operations # for extracting and working on them. # - # Delegates a number of operations to the + # Forwards a number of operations to the # indexes. # class Indexes attr_reader :indexes, :index_mapping - delegate :size, - :each, - :to => :indexes + forward :size, :each, :to => :indexes + each_forward :reindex, :to => :indexes + instance_forward :clear, + :clear_indexes, + :register, + :reindex, + :[], + :to_s, + :size, + :each, + :each_category - each_delegate :reindex, - :to => :indexes - def initialize *indexes clear_indexes indexes.each { |index| register index } end @@ -29,19 +34,9 @@ @instance ||= new end def self.identifier name end - - instance_delegate :clear, - :clear_indexes, - :register, - :reindex, - :[], - :to_s, - :size, - :each, - :each_category # Clears the indexes and the mapping. # def clear_indexes @indexes = [] \ No newline at end of file