2006-12-01から1日間の記事一覧
サブクラスから自身がオーバーライドしたスーパークラスのメソッドを呼びたいときを読んで、私もやってみました。 class Mother def hello puts "Mother#hello" end end class Rubyco < Mother alias :xxx_hello :hello def hello puts "Rubyco#hello" end d…
サブクラスから自身がオーバーライドしたスーパークラスのメソッドを呼びたいときを読んで、私もやってみました。 class Mother def hello puts "Mother#hello" end end class Rubyco < Mother alias :xxx_hello :hello def hello puts "Rubyco#hello" end d…