From: Dave Thomas Date: 2003-05-27T01:29:46+09:00 Subject: Re: Web Services and Ruby Richard Kilmer wrote: > In Ruby, you either need to annotate the class or have a > separate object that holds the type metadata for WSDL generation: > > class Person > def set_name(first, last) > @first = first > @last = last > nil > end > def_types :set_name, :first=>'xsd:string', :last=>'xsd:string' > > def get_name > @first+" "+@last > end > def_types :get_name, :_return=>'xsd:string' > end This is why I'd like 'def' to return the UnboundMethod object. This would let us write externally_typed(nil, String, String) def set_name(first, last) @first = first @last = last nil end externally_typed(String) def get_name @first + " " + @last end (where String might also be "xsd:string" or whatever) It would also be nice if method reflection gave us the names of the parameters, but that's not strictly necessary to get this scheme off the ground. Cheers Dave