2010å¹´10æ27æ¥11:09 Ruby çµå±ãRubyã®ç¹ç°ã¡ã½ããã£ã¦ä½ãªã®ï¼ ä»æ¥ã¯ ç¹ç°ã¡ã½ãã ã«ã¤ãã¦ç解ãæ·±ããããã«æ¸ãã¦ã¿ã¾ãã説æã®ä¸ã«ã¡ã½ãããè²ã åºã¦ãã¦ãããããã§ããããã®ã«ã¼ã«ã§ä½¿ã£ã¦ãã¾ããm(_ _)m c_method # ã¯ã©ã¹ã¡ã½ãã e_method # ç¹ç°ã¡ã½ãã i_method # ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãã ç¹ç°ã¡ã½ããã£ã¦ããã®ã¯ããªãã¸ã§ã¯ãåºæã®ã¡ã½ããã§ãããããªãã¸ã§ã¯ãã«ã¯ãããã©ãåãã¯ã©ã¹ã®å¥ã®ãªãã¸ã§ã¯ãã«ã¯ãã®ã¡ã½ããã¯ç¡ããã¿ãããªã¡ã½ããã§ããã class MyClass; end obj = MyClass.new obj2 = MyClass.new def obj.e_method puts "e_method called" end obj.e_method # e_method called obj2.e_
{{#tags}}- {{label}}
{{/tags}}