lib/redis/objects.rb in redis-objects-1.2.1 vs lib/redis/objects.rb in redis-objects-1.3.0

- old
+ new

@@ -171,9 +171,13 @@ module InstanceMethods # Map up one level to make modular extend/include approach sane def redis() self.class.redis end def redis_objects() self.class.redis_objects end + def delete! + redis.del(redis_objects.keys.map { |k| send(k) }.reject(&:nil?).map { |obj| obj.key }) + end + def redis_options(name) #:nodoc: return self.class.redis_options(name) end def redis_field_redis(name) #:nodoc: