I am in a situation where I would like to construct a docstring piece by piece rather than doing it in just one statement. I tried:
module A
varname = 0
@doc "Apple" varname
@doc "$(@doc varname) Orange" varname
end
but this produces a warning about overwriting the docstring.
Is there a more elegant way to do this?
My best idea until now is some thing like:
module A
varname = 0
docstring_for_varname = "Apple"
docstring_for_varname *= " Orange"
@doc docstring_for_varname varname
end