From: James Britt Date: 2009-07-15T01:31:18+09:00 Subject: Re: Twelve rules of Ruby Marc Heiler wrote: >> Objects don't "have" methods > > Hey David, you gotta tell this Dave Thomas so that he can talk about > this in new pickaxes too. I sort of stopped learning after reading > pickaxe, because this concept still surprises me ... :> Related to this, objects do not have "attributes" or "properties"; they have private instance variables that may be access by sending messages. Typically those messages have the same name as the private instance variable, but that's a convention, not a requirement. Some Ruby literature encourages developers to think of objects in a more Java-ish sense, as having public and private properties (i.e. "attributes"), and the core idea of accessing private instance data via message sending gets obscured. This makes later understanding of metaprogramming harder than it need be. -- James Britt www.jamesbritt.com - Playing with Better Toys www.ruby-doc.org - Ruby Help & Documentation www.rubystuff.com - The Ruby Store for Ruby Stuff www.neurogami.com - Smart application development