1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.



Definition: Classes, modules and methods are defined in Ruby with the keywords class, module and def respectively. When defined, Ruby creates the objects that hold their state in the background, but Ruby does what is called "open classes." At any time in the future, more methods may be added to a class or module definition with a second such definition. Variables can also be "defined," but in a less formal way. To "define" a variable, simply assign a value to it.

©2014 About.com. All rights reserved.