Cool, Kaspar. I actually moved away from Nokogiri for my builder, so I don't
need a persistent doc object anymore, but perhaps the feature will come in
handy for future needs. Much appreciated!
Jason

 Sun, May 29, 2011 at 10:20 AM, Kaspar Schiess <[email protected]> wrote:

> On 16.05.11 05:04, Jason Garber wrote:
> > Am I doing it wrong? Do you have suggestions for doing what I want to do
> > within the existing confines of Parslet::Transform and yet avoid smelly
> > code?
>
> Hei Jason,
>
> Maybe you'd like to check out the parslet master, it features transforms
> that you can inject variables into.
>
> Like
>
>   transform.apply(tree, :doc => MyDoc.new)
>
> Your helper methods would then be in the doc object. The rule would then
> look like
>
>   rule(...) { doc.do_something_or_other(...) }
>
> This will be released soonish, but I'll first fix the m10n issue I am
> having, and its a tough one.
>
> regards,
> kaspar
>
>
>

Reply via email to