http://www.jitu.org/~tko/doc-jp/java-ruby/java-ruby-lang.html ã¢ã¸ã¥ã¼ã«ã§å®ç¾© ãããç¹ç°ã¡ã½ãã(ã¯ã©ã¹ã«ãããã¯ã©ã¹ã»ã¡ã½ããã«ç¸å½ãããã®)ã¯åå®ç¾©ã§ãã¾ããã eigenclassã¨module_evalã¨define_methodã使ãã°ã§ããªããã¨ã¯ãªãâ¦ã¨ã¤ã£ããã§ããã ãã ãRuby 1.8ã ã¨ãããã¯ä»ãã®ã¢ã¸ã¥ã¼ã«ã®ç¹ç°ã¡ã½ããã¯ç¡çãããdefine_methodã®ãããã¯å¼æ°ã«&å¼æ°ã渡ããªãããã RUBY_VERSION # => "1.9.0" module MyMod def self.mod_method true end def self.with_block yield*2 end def self.included(klass) (class << klass; self; end).m
{{#tags}}- {{label}}
{{/tags}}