redict/client-libraries/ruby/examples/basic.rb
2009-03-22 10:30:00 +01:00

17 lines
147 B
Ruby

require 'rubygems'
require 'redis'
r = Redis.new
r.delete('foo')
puts
p'set foo to "bar"'
r['foo'] = 'bar'
puts
p 'value of foo'
p r['foo']