On Jul 7, 7:26 pm, Doug Jolley <li...@ruby-forum.com> wrote: > > As it states the result is effectively an array of Order objects. So > > to get the name of the first object one uses pos[0].name. > > > From my point of view, the omission in the book is that the order object > contains an instance variable for each column and that instance variable > has the same name as the corresponding column. Additionally, the order > object has accessor methods (or, at least a getter method; but, I > suspect that there is also a setter method) for each of these instance > variables. >
If you want to be entirely correct, the attributes aren't stored as individual instance variables - they're stored together in a hash. That is usually irrelevant though - the important thing is the accessor methods. Fred > Anyway, I think that my suspicions are confirmed. Thanks for the input. > > ... doug > > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.