class A
def a ; puts 'a' ; end
end
class B < A
def a_with_b ; puts 'b'; a_without_b ; end
alias_method_chain :a, :b
end
class A
def a_with_c ; puts 'c'; a_without_c ; end
alias_method_chain :a, :c
end
A.new.a
B.new.a
Now run it.
Let me know if it meets your expectations.
blog comments powered by Disqus