/ Published in: Ruby
Following a
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
print <<EOF The price is #{$Price}. EOF print <<"EOF"; # same as above The price is #{$Price}. EOF print <<`EOC` # execute commands echo hi there echo lo there EOC print <<"foo", <<"bar" # you can stack them I said foo. foo I said bar. bar myfunc(<<"THIS", 23, <<'THAT') Here's a line or two. THIS and here's another. THAT if need_define_foo eval <<-EOS # delimiters can be indented def foo print "foo\n" end EOS end
URL: http://www.ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html