OOZOU
お問い合わせ
Back to TIL
ruby

Heredoc without interpolation

2020年10月14日

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

ruby2021年4月30日

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

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

ruby2020年10月13日

Automagical Intermediate-level Hashtables in Ruby

All intermediate-level hashtables will be created automagically

ruby2020年10月13日

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・生成AIソリューション
  • モバイルアプリ開発
  • データ分析・エンジニアリング
  • UI/UXデザイン・プロダクトデザイン
  • デジタルトランスフォーメーション

会社情報

  • 会社概要
  • 採用情報
  • ブログ
  • ホワイトペーパー
  • 事例研究
  • Today I Learned
  • お問い合わせ

その他

  • 業界
  • 見積もりを取得
  • パートナーネットワーク
© 2026 OOZOU. All rights reserved.
プライバシーポリシー行動規範ABACポリシー