you asked for it you got it
alias is a keyword in ruby it allows you to make a copy of a method or variable a good use for this is adding code to methods without actually overwriting the method.
it can be useful for sharing scripts and making code easily portable in many projects, but if you are just using a script for yourself then overwriting the method is better since the method call depth isn't as great. (Each time the method is aliased you have to call one more method in a method adding to the depth)
so here's how you alias
you start with the keyword alias and then type the name of the new name for the method and then type the name of the original so...
alias new_name original
then you can do whatever with the original you can overwrite it and then call the new method like so
def original
p "Hey this is the original"
end
alias new_name original
def original
p 'this is the new method'
new_name
end
original #=> prints to screen 'this is the new method'
# then prints to screen "Hey this is the original"
but with aliasing you can only add code to the beginning or end of a method, there are some methods that if you write it correctly you can make it seem like you replaced code in the center of a method (the method has to be written a certain way)
There is also alias_method which does the same thing except you are sending symbol objects and alias_method is a method
alias_method :new_name,
riginal
Generally alias_method is used in SDK scripts so that the SDK keeps track of what is aliased (this is for script incompatibility checking)
but that is a quick note on aliasing, there are also tutorials available in the Tutorials forum about the topic so check there if you want to learn more about it