05-21-2016, 01:52 AM
Actually I would modify that example a bit to make it more clear to newbies.
This way they know where the old code will be executed, in this case it would happen right before the new code is executed. Even so it could also happen in the following order:
Code:
alias old_update update
def update
old_update
new_code
end
This way they know where the old code will be executed, in this case it would happen right before the new code is executed. Even so it could also happen in the following order:
Code:
alias old_update update
def update
new_code
old_update
end