On 11/9/06, Gregory Brown <[EMAIL PROTECTED]> wrote:
> We must have had a good reason for creating the
> Report.prepare/generate/cleanup methods. I can't really remember why
> though, aside from some minor syntactic sugar.
>
> You may or may not have noticed this, but normal method definitions
> work fine too:
>
> >> class MyReport < Ruport::Report
> >> def prepare
> >> puts "hi from cleanup"
> >> end
> >> def generate
> >> puts "hi from generate"
> >> end
> >> def cleanup
> >> puts "hi from cleanup"
> >> end
> >> end
> => nil
> >> MyReport.run { puts "hi from run" }
> hi from cleanup
> hi from generate
> hi from run
> hi from cleanup
yuck. prepare should have been a puts "hi from prepare". cleanup was
*not* run twice in the above :)
_______________________________________________
Ruport mailing list
[email protected]
http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org