The following statement is made in the pick ax book:
We’ll use the # character in the string to interpolate the value of
these instance variables.
class Song
def to_s
“Song: #@name–#@artist (#@duration)”
end
end
If I had been doing what they appear to be doing, I would have enclosed
the respective variable names in braces. I’m sure that they are trying
to tell me something by omitting the braces; but, I’m not sure what. In
fact, without the braces, I don’t see how it even works. Can someone
please clarify for me how they are able to omit the braces and the
significance of doing so? Thanks for any input.
... doug
Anyway, thanks