Jeff Barczewski
2006-Jul-31 03:34 UTC
[Masterview-devel] Revised and simplified directive base
Deb,
After looking further at a DSL or simplification of our directive api,
I realized that I could make things pretty easy with a couple key
methods. So the resultant code would look something like this
def etag(dcs)
arg :obj, :quote => true
arg :method, :quote => true
arg :options, :merge => [:common_html, :size, :maxlength]
erb_content ''text_field'', :obj, :method, :options
end
I have most of the details and necessary code for this, just working
through a few more minor issues and how we can cleanup.
This should really simply most of our directives to a handful of lines
of code which feels like a DSL.
I still have the other features I mentioned before as well. I will
provide some more complete examples soon.
This is feeling pretty good and it came together nicely. I think it
really makes things pretty easy. Much of the complexity is all hidden
from the user and unlike the previous api, it''s much harder to mess up
:-)
Jeff