From: Ross Bamford Date: 2006-03-23T07:41:58+09:00 Subject: Re: Introspection of method parameters On Thu, 2006-03-23 at 06:15 +0900, Keith Sader wrote: > I'm trying to find out the number and name of a method's parameters. > I've googled for 'ruby method parameter introspection' and come up > with almost nothing. Is there a way to ask a method for the > parameters it takes? > I wrote a little thing [1] a while ago that lets you get the names of method arguments, though with some limitations (no C methods, no differentiation of block/splat args, etc). > Could this way also show me the method overloads? > foo() > foo(param1) > foo(param1, param2) > etc. Ruby doesn't have method overloading. [1]: http://roscopeco.blogspot.com/2006/02/callcc-vs-catch.html -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk