[Rg 70] Re: Global.tidy does not work anymore?
Michael Fellinger
m.fellinger at gmail.com
Wed Jul 25 21:35:32 EDT 2007
On 7/26/07, Lars Olsson <lasso at lassoweb.se> wrote:
> Hi!
>
> I took a look at the current filter code and spent some parts of my
> afternoon writing my own REXML-based filter to use as a drop-in
> replacement. I will release it to world+dog as soon as I get those pesky
> newlines sorted...In the meantime, some questions:
That would be cool, i really would like a replacement for tidy...
> 1) Wouldn't it be nice with some API enhancements for filters (similar
> to Nitro's rendering pipeline)? I'm thinking Action.add_filter,
> Action.remove_filter, Action.filters and the like. I'll take a stab at
> it in a couple of days if no one else beats me to it.
That would be nice. I don't use anything but localization currently,
but the way to work with it is quite awful at the moment.
> 2. While looking at the filter code I realized that Ramaze seems to use
> a lot of singleton classes. This might be useful in some cases, but in
> the current case I just found it confusing...Is there any particular
> reason for using a singleton class in this particular case?
This just kind of grew out of the program-flow. It is faster in
general to use singleton-methods (yeah, benchmarked) and works better
in most cases since large parts of Ramaze are without a state and
(almost) purely functional, so you can use the methods anytime from
anywhere.
I'm open for suggestions, but in my opinion there are always many ways
to do it and this is just one that happens to work :)
^ manveru
More information about the Ramaze-general
mailing list