{"blog_url":"https://blog.tmtms.net/","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/tmtms/","categories":["Ruby"],"provider_name":"Hatena Blog","blog_title":"tmtms \u306e\u30e1\u30e2","type":"rich","height":"190","author_name":"tmtms","title":"\u30af\u30e9\u30b9\u30e1\u30bd\u30c3\u30c9\u306eprivate\u5316","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F20100629%2Fruby_private_class_method\" title=\"\u30af\u30e9\u30b9\u30e1\u30bd\u30c3\u30c9\u306eprivate\u5316 - tmtms \u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u30af\u30e9\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9 Ruby\u3067\u30af\u30e9\u30b9\u30e1\u30bd\u30c3\u30c9(=\u30af\u30e9\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7279\u7570\u30e1\u30bd\u30c3\u30c9)\u3092\u5b9a\u7fa9\u3059\u308b\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001Hoge \u30af\u30e9\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b hoge() \u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u5834\u5408\u3001 1. \u30af\u30e9\u30b9\u5b9a\u7fa9\u5185\u3067\u30af\u30e9\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u7279\u7570\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9 class Hoge def self.hoge() end end 2. \u30af\u30e9\u30b9\u5b9a\u7fa9\u5185\u3067\u7279\u7570\u30af\u30e9\u30b9\u306b\u5bfe\u3057\u3066\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9 class Hoge class << self def hoge() end end end 3. \u30af\u30e9\u30b9\u5b9a\u7fa9\u5916\u3067\u30af\u30e9\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u7279\u7570\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9 class Hoge end def Hoge.h\u2026","url":"https://blog.tmtms.net/entry/20100629/ruby_private_class_method","version":"1.0","width":"100%","image_url":null,"published":"2010-06-29 00:00:00"}