class Test
def my_print
p "Print something"
end
end
class Test
alias_method :old_print, :my_print
def my_print
old_print
p "Print some more"
end
end
My original Test class is at the top. I then decided to add some more to it, but I decided to alias.
But that assumes my_print is already defined. Is there a short and simple way to check whether a method I’m aliasing is already defined?
what about