Add method to get a constructor's arity in Ruby