Chapter 8. Strings, symbols, and other scalar objects

 

In this chapter

  • String object creation and manipulation
  • Methods for transforming strings
  • Symbol semantics
  • String/symbol comparison
  • Integers and floats
  • Time and date objects

 

The term scalar means one-dimensional. Here, it refers to objects that represent single values, as opposed to collection or container objects that hold multiple values. There are some shades of gray: strings, for example, can be viewed as collections of characters in addition to being single units of text. Scalar is to some extent in the eye of the beholder. Still, as a good first approximation, you can look at the classes discussed in this chapter as classes of one-dimensional, bite-sized objects, in contrast to ...

Get The Well-Grounded Rubyist now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.