The <<- operator on Ruby, where is it documented?

后端 未结 5 482
执笔经年
执笔经年 2020-12-03 05:31

I recently used the <<- operator to output a multi-line string, like this:

<<-form
  

Name to say hi!

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 06:26

    This is the Ruby "here document" or heredoc syntax. The addition of the - indicates the indent.

提交回复
热议问题