Skip to content

Instantly share code, notes, and snippets.

@flexd
Created December 13, 2011 19:26
Show Gist options
  • Save flexd/1473505 to your computer and use it in GitHub Desktop.
Save flexd/1473505 to your computer and use it in GitHub Desktop.
# encoding: utf-8
require 'redis'
require 'redis/hash_key'
$redis = Redis.new
@hash = Redis::HashKey.new('Memo')
@hash[:memos]['dominikh'] = "Some text"
@hash['b'] = 2
@hash.each do |k,v|
puts "#{k} = #{v}"
end
@hash['c'] = 3
puts @hash.all # {"a"=>"1","b"=>"2","c"=>"3"}
@hash.clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment