Module: Basket::Batcher::ClassMethods

Defined in:
lib/basket/batcher.rb

Instance Method Summary collapse

Instance Method Details

#basket_options(args) ⇒ Object



8
9
10
# File 'lib/basket/batcher.rb', line 8

def basket_options(args)
  @basket_options = args
end

#basket_options_hashObject

Raises:



12
13
14
15
16
17
# File 'lib/basket/batcher.rb', line 12

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