摘要: Ruby 的 super 仅用于继承中,用来给子方法调用父方法。 super 例子 class Parent def method(a, b) puts "#{a} - #{b}" end end class ChildA < Parent def method(a, b) super(b, a) 阅读全文
posted @ 2021-11-21 00:30 linying1991 阅读(78) 评论(0) 推荐(0) 编辑