Programming Ruby: Chapter 5

  • Putting a minus between the << and the string terminator allows heredocs to be indented.
  • The string class provides two alternatives of several methods. One that returns a modified string and another that changes the string in-place. The latter is then suffixed with an exclamation mark.
     

Leave a Reply