-
Revision as of 02:11, 17 March 2010 by Grahamenglish (Talk | contribs)
Ruby Tutorials
Notes
Objects exist so that we can have data and logic in neat little packages. It's not necessary to remember all the time how to manipulate various kinds of data; by giving the objects methods, we teach them how to operate on themselves. That frees us to concentrate on the larger issues of how our programs are to behave.
We also looked at variables today, examining their character and scope. Most Ruby variables behave as pronouns—that is, temporary labels referring to objects and having no meaning outside the structural units (such as methods) within which they are used. More than one variable by the same name can refer to different things, so long as they do not share the same scope.
-
Meta