最佳答案
我正在寻找一种更好的方法来将变量合并成一个字符串,在 Ruby 中。
例如,如果字符串类似于:
“ animal
action
second_animal
”
我有 animal
、 action
和 second_animal
的变量,把这些变量放到字符串中的首选方法是什么?