---
title: "Discussion on \"How to define a multiline string in Ruby\" | Hashnode"
description: "Discussion on \"How to define a multiline string in Ruby\". Note: The following was tested with Ruby 2.6.6\n\nKeyword: Heredoc\n\nWhat is heredoc?\nHeredoc is used for a form of multiline strings and preserves the line breaks and whitespace (including indentation) in the text.\nHow to define a heredoc in Ruby?\nstri..."
url: "https://hashnode.com/posts/how-to-define-a-multiline-string-in-ruby/65c480571188c1a6f5586f21"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to define a multiline string in Ruby](https://lynnbright.com/how-to-define-a-multiline-string-in-ruby?utm_source=hashnode&utm_medium=feed)

Note: The following was tested with Ruby 2.6.6 Keyword: Heredoc What is heredoc? Heredoc is used for a form of multiline strings and preserves the line breaks and whitespace (including indentation) in the text. How to define a heredoc in Ruby? stri...

Dec 8, 2021 · 2 min read · lynnbright.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)

## Written by

[Lynn Chang](https://hashnode.com/@Lynnbright)

@Lynnbright · Taipei, Taiwan

  
[View profile](https://hashnode.com/@Lynnbright)

Rails Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
