<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubytips86</author_name>
  <author_url>https://blog.hatena.ne.jp/rubytips86/</author_url>
  <blog_title>Ruby Tips!</blog_title>
  <blog_url>https://rubytips86.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>PStoreはRubyオブジェクトを外部ファイルに保存するためのクラスである。トランザクションの仕組みを持ち、マルチプロセスで同じファイルにアクセスしてもデータが壊れないという特徴がある。ファイルへのアクセスは、まずPStoreオブジェクトをファイルを指定して生成し、transactionメソッドのブロック内で行う。PStoreはハッシュライクなインタフェースを持っている。あるキーに対して任意のオブジェクトを格納することができる。オブジェクトはMarshalを使って自動的にシリアライズ、デシリアライズされる。以下はPStoreでファイルにオブジェクトを保存する例である。 require 'ps…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F03%2F19%2F203559&quot; title=&quot;PStoreでオブジェクトをファイルに保存する - Ruby Tips!&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-03-19 20:35:59</published>
  <title>PStoreでオブジェクトをファイルに保存する</title>
  <type>rich</type>
  <url>https://rubytips86.hatenablog.com/entry/2014/03/19/203559</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
