On Thu, Mar 23, 2006 at 06:31:43AM +0900, Keith Sader wrote:
> Ok, I tried that and it gets me to where I am now, I can see the
> methods for an object, but I can't tell if the method
> 
> a.) takes a parameter
> b.) if it takes a parameter the # of parameters it takes.

RUBY_VERSION                                       # => "1.8.4"
class Foo
  def foo(a); end
  def bar(a,b); end
  def baz(a,*b); end # negative arity
  def nop; end
end

%w[foo bar baz nop].each{|x| p [x, Foo.instance_method(x).arity]}
# >> ["foo", 1]
# >> ["bar", 2]
# >> ["baz", -2]
# >> ["nop", 0]

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby