Chapter 7. Built-in essentials
This chapter covers
The term “built-in” is commonly used among Rubyists to describe utility classes found in the core library. Some of the most popular core library classes and standard library classes are listed in table 7.1.
Table 7.1. Popular core and standard library classes (view table figure)
Popular standard library classes |
|
---|---|
Array Binding Dir Exception File Float Hash IO Integer Kernel Math Mutex Proc Process Random Range Rational String Struct Symbol Thread Time | Base64 Benchmark BigDecimal CSV Date Digest ERB FileUtils JSON Logger net/* methods open* methods Pathname PrettyPrint Prime Psych Rake Rdoc Scanf Set Shell Singleton Socket StringIO Tempfile Time URI WEBrick YAML |
Array, Hash, String, and Float are all built-in classes because they’re useful and prevalent go-tos available without so much as a require statement. By contrast, Date is not a built-in class because one must require 'date' before using it.