Hi all,

I have been studying DRYML for a while now. I think there is a genuine
need for something more flexible and powerful than the current simple
approach which basically comes down to nested concats (as I see it):

DRYML(index.dryml) -> generates:

<%= concat(x, y, concat(a, b, ...) ...) %>

I propose an extra option to tag defs, a tag-method parameter, fx:

<def tag="B" tag-method="my_tags_handler">

Which could translate into this erb:

<%= concat(x, y, my_tags_handler(a, b, ...) ...) %>

overriding the default concat

Introducing the new handler to make it accessible

class ApplicationHelper
  def my_tags_handler(args*)
    # my magic here!
  end
end

---

This could be a first step, going further, I would like to introduce
the concept of a context tree or something similar, so that you can
pass context info down to nested tags and have them bubble up context
info to ancestor tags to react on. I have been experimenting with this
and it sure is feasible... I published a doc on this in the file
section.

I've recently been studying metaprogramming magic in Ruby, and seems
like there is almost no limit to the possiblities!!! So why not make
DRYML even more powerful.

For starters I would like to use it for generating PDF using prawn,
and to generate javascript code to integrate various widget libraries
for a web 2.0 experience and even to facilitate some RJS magic!

I plan to experiment with this as I get a little more experience with
DRYML internals and Ruby metaprogramming in general...

Kristian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to