Sha256: 3ece4673c6ecee5169c56e620c75ba6eb5aadb79113d6ad9999ce9d54a3888f2
Contents?: true
Size: 504 Bytes
Versions: 2
Compression:
Stored size: 504 Bytes
Contents
require 'rubygems' require 'redis' r = Redis2.new r.del 'foo-tags' r.del 'bar-tags' puts p "create a set of tags on foo-tags" r.sadd 'foo-tags', 'one' r.sadd 'foo-tags', 'two' r.sadd 'foo-tags', 'three' puts p "create a set of tags on bar-tags" r.sadd 'bar-tags', 'three' r.sadd 'bar-tags', 'four' r.sadd 'bar-tags', 'five' puts p 'foo-tags' p r.smembers('foo-tags') puts p 'bar-tags' p r.smembers('bar-tags') puts p 'intersection of foo-tags and bar-tags' p r.sinter('foo-tags', 'bar-tags')
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
redis2-namespaced-3.0.7.1 | examples/sets.rb |
redis2-namespaced-3.0.7 | examples/sets.rb |