James said:
Does Ruby have a bundled documentation reader?
I'm guessing it might be rdoc, but we're not yet on speaking terms.
Anyone willing to introduce me? <laughs>
James Edward Gray II
In general, you can run 'ri' at the command line, along with the name of
a class, module, or method, (and combinations) and see documentation
(the documentation comes from running rdoc over the source code):
% ri String.center
---------------------------------------------------------- String#center
str.center(integer) => new_str
------------------------------------------------------------------------
If _integer_ is greater than the length of _str_, returns a new
+String+ of length _integer_ with _str_ centered between spaces;
otherwise, returns _str_.
"hello".center(4) #=> "hello"
"hello".center(20) #=> " hello "
% ri String
---------------------------------------------------------- Class: String
A +String+ object holds and manipulates an arbitrary sequence of
bytes, typically representing characters. String objects may be
created using +String::new+ or as literals.
Because of aliasing issues, users of strings should be aware of the
methods that modify the contents of a +String+ object. Typically,
methods with names ending in ``!'' modify their receiver, while
those without a ``!'' return a new +String+. However, there are
exceptions, such as +String#[]=+.
------------------------------------------------------------------------
Includes:
---------
Comparable(<, <=, ==, >, >=, between?), Enumerable(all?, any?,
collect, detect, each_with_index, entries, find, find_all, grep,
include?, inject, map, max, member?, min, partition, reject,
select, sort, sort_by, to_a, to_set, zip)
Class methods:
--------------
new
Instance methods:
-----------------
%, *, +, <<, <=>, ==, =~, [], []=, capitalize, capitalize!,
casecmp, center, chomp, chomp!, chop, chop!, concat, count, crypt,
delete, delete!, downcase, downcase!, dump, each, each_byte,
each_line, empty?, eql?, gsub, gsub!, hash, hex, include?, index,
initialize_copy, insert, inspect, intern, length, ljust, lstrip,
lstrip!, match, next, next!, oct, replace, reverse, reverse!,
rindex, rjust, rstrip, rstrip!, scan, size, slice, slice!, split,
squeeze, squeeze!, strip, strip!, sub, sub!, succ, succ!, sum,
swapcase, swapcase!, to_f, to_i, to_s, to_str, to_sym, tr, tr!,
tr_s, tr_s!, unpack, upcase, upcase!, upto