From: Tom Cloyd Date: 2008-03-17T02:13:00+09:00 Subject: Re: argh! more undocumented mysteries: to_yaml Dave Thomas wrote: > > On Mar 16, 2008, at 11:37 AM, Tom Cloyd wrote: > >> Agreed - with all. And I own a copy of Pickaxe 2nd ed., in marvelous >> searchable PDF format (highly recommended). However, the to_yaml >> method is not documented in the discussion of the Object class - it's >> not reasonable to expect EVERYTHING to be covered, I'm sure. > > Tom: > > (page numbers below are for the printed copy) > > Page 758 is the description of the YAML standard library. > > Because it's a standard library, you know you need to use require > (page 653). And the examples on the YAML page all show the use of > require. > > I hadn't realized you owned a copy of the book--if I had, I could have > saved you time by pointing you at these pages. > > Just to reiterate: to_yaml is not a method of the built-in Object > class. That's why it doesn't appear in the documentation of object. > When you do , that library _adds_ the method to object. > > > Dave Thomas > > OK, but consider my situation: Using the online documentation (links to which I've already given), I see two things - to_yaml IS a part of Object class, AND it appears in association with MANY other classes. This is not only not a simple picture, it is downright misleading. When that documentation tells me that it is a method of the Object class, I naively believe it. What else am I to do? I'm a beginner, after all. I tend to trust the experts. And, I note that this is a Very Important Class. I assume that if any class has received attention in its documentation, this would be at the top of the list. I entered this fray well aware of the YAML library, as I've already made extensive us of it in two programs I wrote for my own (rather frequent) use. THIS method looked related BUT clearly part of the Object class. If the documentation is wrong, or simply inadequate, I can understand where things went wrong. Otherwise, I remain confused, as I don't see why a method of the Object class should be "required". I'll keep thinking on it, but I'm not hopeful of making sense of this. Doing the best I can... t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << tc@tomcloyd.com >> (email) << TomCloyd.com >> (website & psychotherapy weblog) << sleightmind.wordpress.com >> (mental health issues weblog) << directpathdesign.com >> (web site design & consultation) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~