lib/redis/objects/locks.rb in redis-objects-1.7.0 vs lib/redis/objects/locks.rb in redis-objects-2.0.0.alpha

- old
+ new

@@ -12,10 +12,10 @@ # Class methods that appear in your class when you include Redis::Objects. module ClassMethods # Define a new lock. It will function like a model attribute, # so it can be used alongside ActiveRecord/DataMapper, etc. - def lock(name, options={}) + def redis_lock(name, options={}) options[:timeout] ||= 5 # seconds lock_name = "#{name}_lock" redis_objects[lock_name.to_sym] = options.merge(:type => :lock) ivar_name = :"@#{lock_name}"