lib/basket/batcher.rb in basket-0.0.2 vs lib/basket/batcher.rb in basket-0.0.3
- old
+ new
@@ -1,6 +1,5 @@
-require_relative "./error"
module Basket
module Batcher
def self.included(base)
base.extend(ClassMethods)
end
@@ -11,15 +10,16 @@
end
def basket_options_hash
raise Basket::Error, "You must specify the size of your basket!" if @basket_options.nil?
raise Basket::Error, "You must specify a size greater than 0" if @basket_options[:size] <= 0
+
@basket_options
end
end
def batch
- @batch ||= Basket.config.queue_collection.pop_all(self.class.name)
+ @batch ||= Basket.queue_collection.read(self.class.name)
end
def perform
raise Basket::Error, "You must implement perform in your Basket class."
end