What is the ‘<<~' called in ruby, how does it work?

  Kiến thức lập trình

Sorry if this is an obvious one but I’m really stumped as to how to find what it’s called. I don’t think it’s the shovel operator? There’s no tilde in that.
I’m doing a Kata that forms string variables with it, so that much I know. I would like to find out more about it though.

example:

sentence = <<~ LOTSOFWORDS
this is an example of the thing initialising a variable, how else does this work?
LOTSOFWORDS

I have tried looking on google for ‘<<~’, ‘less than less than tilde’ and a few other guesses at what it’s called.
Any clues so I can work it out?

LEAVE A COMMENT