Ruby Standard Library¶ ↑
The Ruby Standard Library is a large collection of classes and modules you can require in your code to gain additional features.
Below is an overview of the libraries and extensions, followed by a brief description of each.
Libraries¶ ↑
-
MakeMakefile: A module used to generate a Makefile for C extensions -
RbConfig: Information about yourRubyconfiguration and build
Extensions¶ ↑
-
Monitor: Provides a reentrant mutex -
objspace: Extends theObjectSpacemodule to add methods for internal statistics -
PTY: Creates and manages pseudo-terminals -
Ripper: Provides an interface for parsingRubyprograms into S-expressions -
Socket: Accesses underlying OS socket implementations
Default gems¶ ↑
-
Default gems are shipped with
Rubyreleases and also available as rubygems. -
Default gems are not uninstallable from the
Rubyinstallation. -
Default gems can be updated using rubygems.
-
e.g.
gem update json
-
-
Default gems can be used with bundler environments like
unbundled_env. -
Default gems can be used at any version in a Gemfile.
-
e.g.
gem "json", ">= 2.6"
-
Libraries¶ ↑
-
Bundler(GitHub): Manage yourRubyapplication’s gem dependencies -
CGI(GitHub): Support for the Common Gateway Interface protocol -
Delegator(GitHub): Provides three abilities to delegate method calls to an object -
DidYouMean(GitHub): “Did you mean?” experience inRuby -
English(GitHub): Provides references to special global variables with less cryptic names -
ERB(GitHub): An easy-to-use but powerful templating system forRuby -
ErrorHighlight(GitHub): Highlight error locations in your code -
FileUtils(GitHub): Several file utility methods for copying, moving, removing, etc. -
Find(GitHub): This module supports top-down traversal of a set of file paths -
Forwardable(GitHub): Provides delegation of specified methods to a designated object -
IPAddr(GitHub): Provides methods to manipulate IPv4 and IPv6 IP addresses -
OptionParser(GitHub): Ruby-oriented class for command-line option analysis -
Open3(GitHub): Provides access to stdin, stdout, and stderr when running other programs -
OpenURI(GitHub): An easy-to-use wrapper forURI::HTTP,URI::HTTPS, andURI::FTP -
PrettyPrint(GitHub): Implements a pretty printing algorithm for readable structure -
SecureRandom(GitHub): Interface for a secure random number generator -
Set(GitHub): Provides a class to deal with collections of unordered, unique values -
Shellwords(GitHub): Manipulates strings with the word parsing rules of the UNIX Bourne shell -
Singleton(GitHub): Implementation of theSingletonpattern forRuby -
Tempfile(GitHub): A utility class for managing temporary files -
Time(GitHub): Extends theTimeclass with methods for parsing and conversion -
Timeout(GitHub): Auto-terminate potentially long-running operations inRuby -
TSort(GitHub): Topological sorting using Tarjan’s algorithm -
UN (GitHub): Utilities to replace common UNIX commands
-
URI(GitHub): ARubymodule providing support for Uniform Resource Identifiers -
YAML(GitHub): TheRubyclient library for thePsychYAMLimplementation -
WeakRef(GitHub): Allows a referenced object to be garbage-collected
Extensions¶ ↑
-
Date(GitHub): Represents dates, with a subclass for dates with time and timezones -
Digest(GitHub): Provides a framework for message digest libraries -
Etc(GitHub): Provides access to information typically stored in the UNIX /etc directory -
Fcntl(GitHub): Loads constants defined in the OS fcntl.h C header file -
IO.console(GitHub): Extensions for theIOclass, includingIO.console,IO.winsize, etc. -
JSON(GitHub): Implements JavaScriptObjectNotation forRuby -
OpenSSL(GitHub): Provides SSL, TLS, and general-purpose cryptography forRuby -
Pathname(GitHub): Representation of the name of a file or directory on the filesystem -
StringScanner(GitHub): Provides lexical scanning operations on aString -
TmpDir (GitHub): Extends the
Dirclass to manage the OS temporary file path -
Zlib(GitHub):Rubyinterface for the zlib compression/decompression library
Bundled gems¶ ↑
-
Bundled gems are shipped with
Rubyreleases and also available as rubygems.
Libraries¶ ↑
-
minitest: A test library supporting TDD, BDD, mocking, and benchmarking
-
power_assert: Power Assert for
Ruby -
test-unit: A compatibility layer for MiniTest
-
rss: A family of libraries supporting various XML-based “feeds”
-
net-imap:
Rubyclient API for the Internet Message Access Protocol -
net-smtp: Simple Mail Transfer Protocol client library for
Ruby -
matrix: Represents a mathematical matrix
-
prime: Prime numbers and factorization library
-
rbs: RBS is a language to describe the structure of
Rubyprograms -
typeprof: A type analysis tool for
Rubycode based on abstract interpretation -
mutex_m: Mixin to extend objects to be handled like a Mutex
-
getoptlong: Parse command line options similar to the GNU C getopt_long()
-
base64: Support for encoding and decoding binary data using a Base64 representation
-
bigdecimal: Provides arbitrary-precision floating point decimal arithmetic
-
observer: Provides a mechanism for the publish/subscribe pattern in
Ruby -
abbrev: Calculates a set of unique abbreviations for a given set of strings
-
resolv-replace: Replace
SocketDNS withResolv -
syslog:
Rubyinterface for the POSIX system logging facility -
csv: Provides an interface to read and write CSV files and data
-
ostruct: A class to build custom data structures, similar to a
Hash -
benchmark: Provides methods to measure and report the time used to execute code
-
logger: Provides a simple logging utility for outputting messages
-
pstore: Implements a file-based persistence mechanism based on a
Hash -
reline: GNU Readline and Editline in a pure
Rubyimplementation -
readline: Wrapper for the Readline extension and Reline