On Apr 3, 2009, at 11:54 AM, Joel VanderWerf wrote:
Thanks. That seems a bit arbitrary since these methods are the same
for strings. It’s something you just have to remember, but then
forget when you come back to the code after a while.
yeah i can see that. i was thinking more of erb’s concat - which
appends literal objects.
Would it be possible for the object returned by #tagz to have a
method, say #literally or #unescaped, which returns an object which
delegates back to the original. On the original Tagz::Document, #<<
and #concat have the same quoting behavior. On the delegator, they
do not quote.
that is kinds of how it works already.
def << string
and anything returned by tagz is a document. you can even do
tagz << tagz(’ not escaped ')
maybe i’ll just reserver #write of unescaped writing - there needs to
be one shortcut i think.
a @ http://codeforpeople.com/