Ruby Documentation
Ruby 4.0.6 practical examples
Find working examples and common pitfalls alongside the API reference. Choose a topic to open its practical notes.
Collections
Text and patterns
Numbers and dates
New to Ruby? Browse Ruby tutorials or start with practical Ruby code examples for beginners.
Ruby 4.0.6 API documentation, generated from Ruby’s source code and bundled libraries and hosted by Ruby-Doc.org.
Getting Started
New to Ruby? Start with our Getting Started Guide.
Core Classes and Modules
Explore the essential classes and modules:
-
String - Text manipulation and string utilities.
-
Symbol - Named identifiers inside the Ruby interpreter.
-
Array - Ordered collections of objects.
-
Hash - Key-value pairs for efficient data retrieval.
-
Integer - Integer number class.
-
Float - Floating-point number class.
-
Enumerable - Collection traversal and searching.
-
File - File operations and handling.
-
IO - Input/output functionality.
-
Time - Time representation.
-
Regexp - Regular expressions for pattern matching.
-
Range - Representing a range of values.
-
Exception - Base class for all exceptions.
-
Thread - Multithreading and concurrency.
Language Reference
Deep dive into Ruby’s syntax and features:
Standard Libraries
There are some standard libraries included in Ruby that are also commonly used, such as:
-
Date - Date representation.
-
JSON - JSON encoding and decoding.
-
ERB - Embedded Ruby for templating.
-
Net::HTTP - HTTP client library.
Use the following links to access the comprehensive set of libraries included with Ruby:
Contribute to Ruby
Get involved with the Ruby community: