{"provider_name":"Hatena Blog","blog_url":"https://gom.hatenablog.com/","width":"100%","title":" Ruby \u3067 Singleton","categories":["ruby"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090308%2F1236504000\" title=\" Ruby \u3067 Singleton - gom68\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://gom.hatenablog.com/entry/20090308/1236504000","published":"2009-03-08 18:20:00","author_url":"https://blog.hatena.ne.jp/gom68/","author_name":"gom68","version":"1.0","height":"190","provider_url":"https://hatena.blog","type":"rich","description":"Ruby \u3067 Singleton \u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b\u3002 \u30e2\u30b8\u30e5\u30fc\u30eb\u306a\u3057 \u751f\u6210\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30af\u30e9\u30b9\u5909\u6570\u3078\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3002 #!/usr/bin/env ruby class Singleton @@instance = nil; def initialize puts \"MyInitialize\" end def self.instance @@instance = new if @@instance.nil? return @@instance end private_class_method :new end # Entry a = Singleton::instance b = Single\u2026","image_url":null,"blog_title":"gom68\u306e\u65e5\u8a18"}