On 06/05/2005 02:30 AM, Lothar Scholz wrote:
> Hello Vincent,
> 
> VF> I think I found a bug in RDoc, although this could be a limitation, I'm
> VF> not sure.  Here's the code:
> 
> VF> @@valid_services = [:rubyurl, :tinyurl, :shorl, :snipurl, :metamark,
> VF> :makeashorterlink, :skinnylink]
> VF> private_method_class(:get_short_url, *@@valid_services)
> 
> VF> However, when I generate the doc, only ShortURL.get_short_url is makred
> VF> as a private class method, ShortURL.rubyurl and everything are marked
> VF> as public class methods.
> 
> Static source code analysers will never catch dynamic code generation.
> If there is not a real reason for this code i would consider it bad
> style (as it looks as ugly as Perl).

You mean a better way is keep it simple, like:

def rubyurl
   ...
end
private :rubyurl

def tinyurl
   ...
end
private :tinyurl

def snipurl
   ...
end
private :snipurl

....

Am I right?

-- 
Dr Balwinder Singh Dheeman            Registered Linux User: #229709
CLLO (Chief Linux Learning Officer)   Machines: #168573, 170593, 259192
Anu's Linux@HOME                      Distros: Ubuntu, Fedora, Knoppix
More: http://anu.homelinux.net/~bsd/  Visit: http://counter.li.org/