Grilled Cheese

ExploreLog inSign up
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST

PhotosVideosAllPeople
LatestRanked
@yegorov.bsky.socialNov 19, 2026, 9:40 AM

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

Heredoc in Ruby