A The One Ruby Reference
This glossary should be used as a quick reference for Ruby; for more depth, click through to the “Full Explanation”s.
How to interpret this reference
This reference is (with a few exceptions) organized by Ruby Class, e.g. String
, Array
, Hash
, etc. Click the firstdraft icon in the top-left corner of the page to slide out the table of contents, scan it, and find a section that interests you. Usually, each section describes a Ruby method. For example, here’s what the section String#split
looks like:
String#split => Array
is called the method signature:String
since the method is defined for that class.#
since it is an instance method (as opposed to a class method, in which case the notation would be.
).=> Array
since the return value of this method is an instance of the classArray
.
- Then a description of the method.
- Then examples.
- Then, usually, a link to the longer explanation from the original chapter where the method was first introduced.
Please let us know if you find errors, omissions, or have any other suggestions or comments. Thank you!