PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > What is the RDoc on File talking about?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
What is the RDoc on File talking about?

Réponse
 
LinkBack Outils de la discussion
Vieux 01/04/2008, 18h10   #1
Oliver Saunders
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut What is the RDoc on File talking about?

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 Surely the File class is
in the standard library and most people just want to see the
documentation for that.
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 01/04/2008, 20h20   #2
Jano Svitok
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the RDoc on File talking about?

On Tue, Apr 1, 2008 at 7:10 PM, Oliver Saunders
<oliver.saunders@gmail.com> wrote:
> 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 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.

  Réponse avec citation
Vieux 01/04/2008, 20h32   #3
Oliver Saunders
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the RDoc on File talking about?

> 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.
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 01/04/2008, 21h04   #4
Phillip Gawlowski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the RDoc on File talking about?

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

Oliver Saunders 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 Gawlowski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

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

  Réponse avec citation
Vieux 02/04/2008, 01h55   #5
Christopher Dicely
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the RDoc on File talking about?

On Tue, Apr 1, 2008 at 1:04 PM, Phillip Gawlowski
<cmdjackryan@googlemail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Oliver Saunders 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.


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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12419 seconds with 13 queries