Other answers explain how to read. They do not believe that it is not good to imitate.
Adding something to the result of a conditional test could be done using:
def foo(s) ret = if (s == "something") 'some text' else '' end ret + reference_name end
This one line is optional, just as fast, but understandable.
Another method works technically and syntactically, but it is not so idiomatic and affects maintenance.
source share