class Student # Assuming Person has a say_hello method... alias :say_hi :say_hello def say_hello puts "Hi, there." end def formal_greeting # Say hello the way my superclass would. say_hi end end
call a superclass method, but don't happen to be in the corresponding mehtod
最新推荐文章于 2022-07-31 01:11:20 发布