I\'m looking for a better way to merge variables into a string, in Ruby.
For example if the string is something like:
\"The animal action<
animal
action<
You can use it with your local variables, like this:
@animal = "Dog" @action = "licks" @second_animal = "Bird"
@animal = "Dog"
@action = "licks"
@second_animal = "Bird"
"The #{@animal} #{@action} the #{@second_animal}"
the output would be: "The Dog licks the Bird"