{"title":"Singleton\u30d1\u30bf\u30fc\u30f3\u3000Ruby","url":"https://yamakichi.hatenablog.com/entry/2016/12/06/220802","published":"2016-12-06 22:08:02","provider_name":"Hatena Blog","categories":["Ruby","\u601d\u8003\u306e\u6574\u7406","\u958b\u767a"],"width":"100%","author_name":"Yamakichi","version":"1.0","description":"\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30d1\u30bf\u30fc\u30f3\u3068\u306f \u4f5c\u6210\u3057\u305f\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u552f\u4e00\u3067\u3042\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u308b \u552f\u4e00\u3067\u3042\u308b\u304c\u3086\u3048\u306b\u3001\u751f\u6210\u3057\u305f1\u3064\u3060\u3051\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u5b9f\u88c5 Ruby\u306b\u306fsingleton\u3068\u547c\u3070\u308c\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3053\u308c\u3092require\u3057\u3001 \u30af\u30e9\u30b9\u306binclude\u3059\u308b\u3053\u3068\u3067\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 require 'singleton' # \u30b7\u30f3\u30b0\u30eb\u30c8\u30f3 class SingletonObject # instance\u30e1\u30bd\u30c3\u30c9\u304c\u5b9a\u7fa9\u3055\u308c\u308b include Singleton attr_accessor :counter def initialize @\u2026","blog_title":"blog","author_url":"https://blog.hatena.ne.jp/Yamakichi/","type":"rich","blog_url":"https://yamakichi.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyamakichi.hatenablog.com%2Fentry%2F2016%2F12%2F06%2F220802\" title=\"Singleton\u30d1\u30bf\u30fc\u30f3\u3000Ruby - blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"height":"190","provider_url":"https://hatena.blog"}