Difference between <<~ and <<-
If you use heredoc in ruby you can choose one of two syntaxes the first <<-
it takes all whitespace before stared of text so
def custom_html
<<-HTML
<html>
<body>
</body>
</html>
HTML
end
so if you will get string with all withspaces " <html>\n <body>\n </body>\n </html>\n"
second <<~ will strip it so
def custom_html
<<~HTML
<html>
<body>
</body>
</html>
HTML
end
will give you will get text "<html>\n <body>\n </body>\n</html>\n"