Guest User

Untitled

a guest
Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. String
  2. ------
  3.  
  4. ### Heredoc ###
  5.  
  6. ทำให้เขียน string ในหลายบรรทัดได้ วิธีการคือ ใส่ `<<word` ไว้ที่หัวเมื่อต้องการใช้ heredoc และปิดด้วย `word` เมื่อต้องการปิดข้อความ (ซึ่ง `word` คือคำอะไรก็ได้)
  7.  
  8. ### Example ###
  9.  
  10. hdoc1 = <<EODOC
  11. I wandered lonely as a #{"cloud".upcase}
  12. That floats on high o'er vale and hill...
  13. EODOC
Add Comment
Please, Sign In to add comment