lib/redis/objects/sets.rb in redis-objects-1.5.0 vs lib/redis/objects/sets.rb in redis-objects-1.5.1

- old
+ new

@@ -24,9 +24,18 @@ Redis::Set.new( redis_field_key(name), redis_field_redis(name), redis_options(name) ) ) end + + define_method(:"#{name}=") do |values| + set = public_send(name) + + redis.pipelined do + set.clear + set.merge(*values) + end + end end if options[:global] extend mod