Ruby 使用 pstore 的简单例子

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

require "pstore"

db = PStore.new("employee.dat")
db.transaction do
    db["params"] = {"name" => "Fred", "age" => 32,
                    "salary" => 48000 }
end


# retrieve
require "pstore"
db = PStore.new("employee.dat")
emp = nil
db.transaction { emp = db["params"] }