[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

xml) Builder question

Its Me

12/4/2004 5:11:00 PM

I love it!

I'm not sure why builder switches the position of its content argument
depeding on block vs. immediate:

builder.tag("content", "attr1"=>"val1", "attr2"=>"val2")
vs.
builder.tag("attr1"=>"val1", "attr2"=>"val2") { content }

Why not consistently use 1st position for node attribute, 2nd position for
nested node content? I hope it is not just to get the Ruby convenience of
not needing {} around trailing hash argument.

Thanks!