How about making a short named tag that looks for attributes and sets
a variable with the name of the attribute?
With that you'd end up with something like this:

<insert-order>
    <val received-date>6-4-2009</val>
    <val from>Mike Hogan</val>
    <val total-cost>34.76</val>
</insert-order>

This assumes that only one attribute will be passed to the tag at a
time.

On Apr 8, 3:19 am, Tom Locke <[email protected]> wrote:
> There's no specific "tag_missing" feature, but I'm sure you could make  
> it work. You'd have to look at the source to figure out what class to  
> add the method missing to.
>
> Tom
>
> On 8 Apr 2009, at 07:24, Mike Hogan wrote:
>
>
>
> > Hi all,
>
> > I am attempting to use DRYML to generate HTML that is consumed by an
> > automated acceptance testing tool -http://www.concordion.org
> > specifically.  So my DRYML markup ends up specifying data some times,
> > a bit like this:
>
> > <insert-order>
> >    <set name="received-date">6-4-2009</set>
> >    <set name="from">Mike Hogan</set>
> >    <set name="total-cost">34.76</set>
>
> > ...
>
> > </insert-order>
>
> > And I can make this work.  But personally I would prefer to be able to
> > do :
>
> > <insert-order>
> >    <received-date>6-4-2009</received-date>
> >    <from>Mike Hogan</from>
> >    <total-cost>34.76</total-cost>
> > </insert-order>
>
> > I think this will be easier to sell to our testers and business
> > analysts (but I may be wrong).
>
> > Anyway, to pull this off, I need to define tags for received-data,
> > from, total-cost etc.  One tag for each of the possible properties of
> > an order.  And then when I include all the other kinds of domain
> > objects, and their many properties, that might need to be specified in
> > a test case, it becomes impractical to define and maintain all these
> > property-setting tags.
>
> > So I was wondering it there was room for some cool way to use the
> > method_missing idea and apply it to DRYML tags.  So if <received-date>
> > is intercepted, I can know that i need to set the associated property
> > on the current object.  Or something along these lines :-)
>
> > What ya reckon?
>
> > Thanks all,
> > Mike.
--~--~---------~--~----~------------~-------~--~----~
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