Mega Code Archive

 
Categories / Ruby / String
 

General Delimited Strings

# Create strings is with general delimited strings # Strings are all preceded by a % and then followed by a matched pair of delimiter characters, such as !, {, or [ (must be nonalphanumeric).  # The string is embedded between the delimiters.  comedy = %!this is a test! history = %[this is a test] tragedy = %(this is a test)