{"published":"2008-06-15 04:59:29","version":"1.0","author_url":"https://blog.hatena.ne.jp/rubikitch/","blog_url":"https://rubikitch.hatenadiary.org/","categories":["ruby"],"provider_url":"https://hatena.blog","blog_title":"http://rubikitch.com/\u306b\u79fb\u8ee2\u3057\u307e\u3057\u305f","author_name":"rubikitch","provider_name":"Hatena Blog","type":"rich","description":"2008-06-12 self.method\u306e\u3088\u3046\u306b\u66f8\u304f\u306e\u3082\u3060\u3081 \u3062\u3064\u306f\u4f8b\u5916\u304c\u3072\u3068\u3064\u3060\u3051\u3002 class Hoge private attr_accessor :value # !> private attribute? def foo() :hoge end public def hoge self.foo rescue $! # => #<NoMethodError: private method `foo' called for #<Hoge:0x83893f4>> self.value = 3 end end hoge = Hoge.new hoge.hoge # => 3 hoge #\u2026","title":"private\u306a\u30a2\u30af\u30bb\u30b5\u306f\u4f8b\u5916\u7684\u306b\u300cself.value = x\u300d\u3068\u3044\u3046\u5f62\u304c\u8a31\u3055\u308c\u308b","image_url":null,"url":"https://rubikitch.hatenadiary.org/entry/20080615/1213473569","height":"190","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20080615%2F1213473569\" title=\"private\u306a\u30a2\u30af\u30bb\u30b5\u306f\u4f8b\u5916\u7684\u306b\u300cself.value = x\u300d\u3068\u3044\u3046\u5f62\u304c\u8a31\u3055\u308c\u308b - http://rubikitch.com/\u306b\u79fb\u8ee2\u3057\u307e\u3057\u305f\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}