{"id":486,"date":"2005-10-26T04:00:00","date_gmt":"2005-10-25T19:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2005-10-26-4.html"},"modified":"2005-10-26T04:00:00","modified_gmt":"2005-10-25T19:00:00","slug":"2005-10-26-4","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2005-10-26-4.html","title":{"rendered":"\u30a2\u30af\u30bb\u30b9\u5236\u9650"},"content":{"rendered":"<p>\n<\/p>\n<blockquote><p>def foo<br \/>\nend<br \/>\nprivate :foo<br \/>\n&nbsp;<br \/>\ndef boo<br \/>\nend<br \/>\nprotected :foo<br \/>\n&nbsp;<br \/>\ndef woo<br \/>\nend<br \/>\npublic :woo\n<\/p><\/blockquote>\n<p>&nbsp;: \u3068\u30e1\u30bd\u30c3\u30c9\u540d\u524d\u306e\u9593\u306b\u306f\u7a7a\u767d\u3092\u306f\u3055\u3093\u3067\u306f\u3044\u3051\u306a\u3044\u3002<br \/>\n&nbsp;<br \/>\n\u3061\u306a\u307f\u306b, private \u3068\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u5b50\u30af\u30e9\u30b9\u3067\u518d\u5b9a\u7fa9\u3059\u308b\u3068, \u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3002\n<\/p>\n<blockquote><p>class Parent<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;def foo(arg)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &#8220;parent &#8220;, arg, &#8220;\\n&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;end<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;private :foo<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;def woo<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo(&#8220;hello&#8221;)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;end<br \/>\nend<br \/>\n&nbsp;<br \/>\nclass Child < Parent<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;def foo<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &#8220;child\\n&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;end<br \/>\nend<br \/>\n&nbsp;<br \/>\nChild.new.woo<br \/>\n&nbsp;<br \/>\n# result:<br \/>\n# in `foo&#8217;: wrong number of arguments (1 for 0) (ArgumentError)\n<\/p><\/blockquote>\n<p>&nbsp;<br \/>\n\u53c2\u8003:<br \/>\n&lt;<a href=\"http:\/\/www.ruby-lang.org\/ja\/man\/?cmd=view;name=%A5%AF%A5%E9%A5%B9%A1%BF%A5%E1%A5%BD%A5%C3%A5%C9%A4%CE%C4%EA%B5%C1#a.b8.c6.a4.d3.bd.d0.a4.b7.c0.a9.b8.c2\">http:\/\/www.ruby-lang.org\/ja\/man\/?cmd=view;name=%A5%AF%A5%E9%A5%B9%A1<br \/>\n%BF%A5%E1%A5%BD%A5%C3%A5%C9%A4%CE%C4%EA%B5%C1#a.b8.c6.a4.d3.bd.d0.a4.<br \/>\nb7.c0.a9.b8.c2<\/a>><\/p>\n","protected":false},"excerpt":{"rendered":"<p>def foo end private :foo &nbsp; def boo end protected :foo &nbsp; def woo end public :woo &nbsp;: \u3068\u30e1\u30bd\u30c3\u30c9\u540d\u524d\u306e\u9593\u306b\u306f\u7a7a &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2005-10-26-4.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u30a2\u30af\u30bb\u30b9\u5236\u9650<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[15],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","tag-ruby"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}