Suraj Kurapati
7/31/2006 7:23:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gregory Brown wrote:
> I think for Data::Table, i will method_missing it to recognize
> to_plugin_name methods, so that even user created formatting plugins
> are recognized.
Agreed. method_missing is certainly the best approach.
def method_missing id, *args, &blk
if id =~ /^as_(.*)$/
as $1.to_sym, *args, &blk
end
end
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEzlh7mV9O7RYnKMcRAkLLAJwLTNnij6YG9oXUtuQrvj0/vCUjewCaA54N
YPlz15Ii6wk05Ogp2arGcSI=
=n5Fd
-----END PGP SIGNATURE-----