[Solved] How to use string interpolation


If you intended the variable assignment to be Ruby code, then it is wrong. It should be

person = "John"; building = "Big Tower"

or

person, building = "John", "Big Tower"

And for the question, yes, except that interpolation is a feature of Ruby, not Rails. Please be respectful to plain Ruby and its developers, and don’t confuse it with Rails. Rails is only a framework built on top of Ruby. Rails is not the only use of Ruby.

5

solved How to use string interpolation