`
ericluo
  • 浏览: 18057 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

call a superclass method, but don't happen to be in the corresponding mehtod

 
阅读更多
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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics