I am looking for a more elegant way of concatenating strings in Ruby.
I have the following line:
source = \"#{ROOT_DIR}/\" << project <<
Concatenation you say? How about #concat method then?
#concat
a = 'foo' a.object_id #=> some number a.concat 'bar' #=> foobar a.object_id #=> same as before -- string a remains the same object
In all fairness, concat is aliased as <<.
concat
<<