home.social

#heredoc — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #heredoc, aggregated by home.social.

  1. Formatting multiline text in code using heredoc is far from unusual in scripting languages. Creating a separate variable just to pass it into a method is redundant in most cases. To avoid this in Ruby, you can use a heredoc directly inside a method call.

    #Ruby #Heredoc #Bash #String #Format #Text

  2. Formatting multiline text in code using heredoc is far from unusual in scripting languages. Creating a separate variable just to pass it into a method is redundant in most cases. To avoid this in Ruby, you can use a heredoc directly inside a method call.

    #Ruby #Heredoc #Bash #String #Format #Text

Share on Mastodon

Enter the server where you have an account.