Functions and Built-in Functions
A function is a way of shortening repetitive parts or blocks of code that are called again and again. Their use benefits the user by first of course, shortening the amount of code lines for having the same block of code appearing again and again wastes time and effort. It also allows the same block of code to be accessed by more than one program. It allows the programmer to break up complex tasks into smaller applications that are easily understood, and last, it allows the programmer to create and hide critical functions such as password and username encryption and decryption routines. Functions are mostly user defined but there are a couple of dozen or so that have been pre-defined and are included in the standard Ruby distribution package. Being open sourced, there are a whole range of functions that have been created and shared by the many ruby programmers out there that is shared across the whole globe.
Comments are off for this post
