Mega Code Archive

 
Categories / Ruby / String
 

HERE documents give you a shortcut for printing multiple lines to the console window

# Ruby treats any text that starts with <<TOKEN (where TOKEN can be any uppercase word) as  # the beginning of a multi-line sequence, and assumes that that text ends with TOKEN.  print <<HERE Now is the time HERE