Use EOF as the marker for a here document : Here Document « String « Ruby






Use EOF as the marker for a here document


long_string = <<EOF
Here is a long string
With many paragraphs
EOF

puts long_string

 








Related examples in the same category

1.HERE documents give you a shortcut for printing multiple lines to the console window
2.Here Documents by number marker