OOZOU
ติดต่อเรา
Back to TIL
ruby

Heredoc without interpolation

14 ตุลาคม 2563

Sometimes you want to use Ruby's Heredoc without interpolation ('#{....}'). You can do this by adding single dashes around your keyword:

doc = <<-'SONG'
Business men, they drink my wine
#{person} dig my earth
None will level on the line
Nobody offered his word
Hey, hey
SONG

More on ruby

ruby30 เมษายน 2564

Allow pasting multiline ruby blocks in Pry when using leading dot notation

We use leading dot notation a lot now e.g.

ruby13 ตุลาคม 2563

Automagical Intermediate-level Hashtables in Ruby

All intermediate-level hashtables will be created automagically

ruby13 ตุลาคม 2563

Change Ruby version for single command with rbenv

You can switch Ruby version temporarily with rbenv local

มีโปรเจกต์ในใจ?

เรายินดีรับฟังสิ่งที่คุณกำลังสร้าง

เริ่มต้นสนทนาhello@oozou.com
OOZOU Logo

กรุงเทพฯ · สิงคโปร์ · ฮ่องกง

X
Facebook
Instagram
LinkedIn

บริการ

  • พัฒนาเว็บ
  • AI และ Generative AI
  • พัฒนาแอปมือถือ
  • การวิเคราะห์และวิศวกรรมข้อมูล
  • ออกแบบ UI/UX และผลิตภัณฑ์
  • การเปลี่ยนแปลงทางดิจิทัล

บริษัท

  • เกี่ยวกับเรา
  • ร่วมงานกับเรา
  • บล็อก
  • เอกสารวิชาการ
  • กรณีศึกษา
  • Today I Learned
  • ติดต่อเรา

เพิ่มเติม

  • อุตสาหกรรม
  • ขอใบเสนอราคา
  • เครือข่ายพันธมิตร
© 2026 OOZOU สงวนลิขสิทธิ์
นโยบายความเป็นส่วนตัวจรรยาบรรณนโยบาย ABAC