Ruby/Language Basics/ri
Материал из Wiki.crossplatform.ru
Содержание |
For information on a class method, type at a command line:
ri Hash::new # or: ri Hash::[]
For more information on an instance method, type something like:
ri Hash.keys or: ri Hash#keys
For more information on Hash, type this at a command line:
ri Hash
Read the document by package
Puts method of interest is part of the IO package request that documentation by entering ri IO#puts at the command line: C:\rubydev>ri IO#puts ---------------------------------------------------------------- IO#puts ios.puts(obj, ...) => nil ------------------------------------------------------------------------ Writes the given objects to _ios_ as with +IO#print+. Writes a record separator (typically a newline) after any that do not already end with a newline sequence. If called with an array
use the ri tool: read the document
Enter ri, followed by the item you want help with, such as the puts method: C:\rubydev>ri puts More than one method matched your request. You can refine your search by asking for information on one of: IO#puts, Kernel#puts, Zlib::GzipWriter#puts