07-19-2023, 12:19 AM
Using Ruby 1.9.3, Rails 3.2, I have the following:
"every good boy does fine".gsub("every", "all").gsub("boy", "girl").gsub("fine", "well")
# => "all good girl does well"
Is there a better way to write this? Thanks.
"every good boy does fine".gsub("every", "all").gsub("boy", "girl").gsub("fine", "well")
# => "all good girl does well"
Is there a better way to write this? Thanks.