]>
git.saurik.com Git - redis.git/blob - client-libraries/ruby/examples/sets.rb
10 p
"create a set of tags on foo-tags"
12 r
.set_add
'foo-tags', 'one'
13 r
.set_add
'foo-tags', 'two'
14 r
.set_add
'foo-tags', 'three'
17 p
"create a set of tags on bar-tags"
19 r
.set_add
'bar-tags', 'three'
20 r
.set_add
'bar-tags', 'four'
21 r
.set_add
'bar-tags', 'five'
26 p r
.set_members('foo-tags')
31 p r
.set_members('bar-tags')
34 p
'intersection of foo-tags and bar-tags'
36 p r
.set_intersect('foo-tags', 'bar-tags')