]> git.saurik.com Git - redis.git/blob - client-libraries/ruby/examples/incr-decr.rb
Ruby client updated
[redis.git] / client-libraries / ruby / examples / incr-decr.rb
1 require 'rubygems'
2 require 'redis'
3
4 r = Redis.new
5
6 puts
7 p 'incr'
8 r.delete 'counter'
9
10 p r.incr('counter')
11 p r.incr('counter')
12 p r.incr('counter')
13
14 puts
15 p 'decr'
16 p r.decr('counter')
17 p r.decr('counter')
18 p r.decr('counter')