# What is the RDoc on File talking about?

**URL:** <https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570>\
**Category:** Ruby\
**Created:** [April 1, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570 "2008-04-01T19:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/fbc32d/32.png) [@ole](https://www.ruby-forum.com/u/ole)\
**Post date:** [April 1, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570/1 "2008-04-01T19:10:43Z")

</div>

This really confused me - why is the RDoc for the file class talking  
about ftools.rb right at the top?  
[http://www.ruby-doc.org/core/classes/File.html](http://www.ruby-doc.org/core/classes/File.html) Surely the File class is  
in the standard library and most people just want to see the  
documentation for that.

---

<div class="post-metadata">

**Author:** ![ole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/fbc32d/32.png) [@ole](https://www.ruby-forum.com/u/ole)\
**Post date:** [April 1, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570/2 "2008-04-01T21:21:40Z")

</div>

On Tue, Apr 1, 2008 at 7:10 PM, Oliver S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This really confused me - why is the RDoc for the file class talking  
> about ftools.rb right at the top?  
> [class File - RDoc Documentation](http://www.ruby-doc.org/core/classes/File.html) Surely the File class is  
> in the standard library and most people just want to see the  
> documentation for that.

Because right now RDoc puts all File related stuff together, from all  
files that modify the class.

---

<div class="post-metadata">

**Author:** ![ole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/fbc32d/32.png) [@ole](https://www.ruby-forum.com/u/ole)\
**Post date:** [April 1, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570/3 "2008-04-01T21:32:41Z")

</div>

> Because right now RDoc puts all File related stuff together, from all  
> files that modify the class.

Ahh OK.

I can see it lists the files the RDoc was generated from as “In:” but is  
it possible to tell which methods come from where? I’d like to know  
which I can use without requiring anything.

---

<div class="post-metadata">

**Author:** ![ole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/fbc32d/32.png) [@ole](https://www.ruby-forum.com/u/ole)\
**Post date:** [April 2, 2008, 2:55am UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570/4 "2008-04-02T02:55:45Z")

</div>

On Tue, Apr 1, 2008 at 1:04 PM, Phillip G.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> | I can see it lists the files the RDoc was generated from as “In:” but is
> 
> This is especially useful in irb.

True. Personally, using IRB, I’m fond of the construction:  
puts (foo.methods - Kernel.methods).sort.join(“\t”)

---

<div class="post-metadata">

**Author:** ![ole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/fbc32d/32.png) [@ole](https://www.ruby-forum.com/u/ole)\
**Post date:** [April 1, 2008, 10:05pm UTC](https://www.ruby-forum.com/t/what-is-the-rdoc-on-file-talking-about/133570/5 "2008-04-01T22:05:29Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Oliver S. wrote:  
|\> Because right now RDoc puts all File related stuff together, from all  
|\> files that modify the class.  
|  
| Ahh OK.  
|  
| I can see it lists the files the RDoc was generated from as “In:” but is  
| it possible to tell which methods come from where? I’d like to know  
| which I can use without requiring anything.

Not in an easy way (you could compare the methods the requiring adds,  
though).

The easy way of knowing what methods are at your disposal at any given  
time, is #methods with its pal #sort. This is inherited from Object  
(IIRC), and you can always uses those to a) find out what methods are  
available, and b) sort the output.

This is especially useful in irb.

- – Phillip G.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkfylVgACgkQbtAgaoJTgL/DuQCghvUVEjCMQ0s6wnQyV/YOVXKj  
0BUAn1Uol2e+LABVZH24wYxG3vu3Hui+  
=3DZJ  
-----END PGP SIGNATURE-----
