美文网首页
ruby基础概念

ruby基础概念

作者: zh_19 | 来源:发表于2019-01-20 18:23 被阅读2次
    1.Require 、 Load 、 Include 、 Extend

    Ruby Require VS Load VS Include VS Extend
    浅淡Ruby的文件加载与继承

    2. hook_methods
    3. singleton class

    What exactly is the singleton class in ruby?

    Understanding Ruby Singleton Classes

    4.open the singleton class

    open the singleton class of an object with the syntax class << obj

    5.reopen class /module
    6.alias_method

    alias_method
    Makes new_name a new copy of the method old_name. This can be used to retain access to methods that are overridden.

    7.class_eval, install_eval

    Metaprogramming Ruby: class_eval and instance_eval
    Understanding class_eval and instance_eval

    8.send:

    Metaprogramming in Ruby

    9.define_method

    define_method

    11.eval

    eval

    相关文章

      网友评论

          本文标题:ruby基础概念

          本文链接:https://www.haomeiwen.com/subject/wgobdqtx.html