lib/ratelimit/bucketbased.rb
def create_bucket(name, config_name=@default_bucket_config)
			config = @bucket_configs[config_name]
			raise "Config is nil" unless config
			bucket = Bucket.new(name, config.start, config.max, config.min, config.cost, config.refill_amount, config.refill_epoch, Time.now.to_f, 0.0)
			@storage.set(bucket)
		end
def create_bucket(name, config_name=@default_bucket_config)
			config = @bucket_configs[config_name]
			raise "Config is nil" unless config
			bucket = Bucket.new(name, config.start, config.max, config.min, config.cost, config.refill_amount, config.refill_epoch, Time.now.to_f, 0.0)
			@storage.set(bucket)
		end
def create_bucket ( name , config_name = @default_bucket_config ) config = @bucket_configs [ config_name ] raise "Config is nil" unless config bucket = Bucket . new ( name , config . start , config . max , config . min , config . cost , config . refill_amount , config . refill_epoch , Time . now . to_f , 0.0 ) @storage . set ( bucket ) end
Used primarily to preallocate buckets that need an alternate configuration from the default so that they aren't automatically created with default configurations
 <tt>name</tt>:: the name of the item to track
 <tt>config_name</tt>:: the name of the config to use as a template for creating the bucket
 The new bucket will be saved into the storage for this instance of RateLimiter
Used primarily to preallocate buckets that need an alternate configuration from the default so that they aren t automatically created with default configurations <tt > name< / tt > :: the name of the item to track <tt > config_name< / tt > :: the name of the config to use as a template for creating the bucket The new bucket will be saved into the storage for this instance of RateLimiter