From: Olly B. <ol...@su...> - 2007-04-13 01:12:11
|
On 2007-04-13, gga <gg...@ad...> wrote: > The docs could be improved and consolidated a tad (any way I can > contribute to this, btw?), but overall, it is truly an amazing piece of > software. Good quality patches to improve the documentation would be very welcome I'm sure! It would be best to work on SVN HEAD, and beware that the large HTML file is auto-generated from the smaller ones, so work on the individual chapters as then it will be much easier to apply patches. > Anyway, back to the question/request at hand... > > I was wondering if there was a way in swig's ruby wrapping to allow for > global aliasing or renaming of methods. Did you try the "-autorename" command line option which swig has for ruby? I've not used it but it sounds like it's what you're after. > What I'm thinking is of allowing methods that are CamelCase based to > follow ruby's standard convention of underscore_casing. > > This can currently be done a method at a time by using manual aliases or > renames, but a global pragma option would be much more useful for this. Marcelo added some features to allow this, though sadly they're only documented in the CHANGES file - search for "camel" (slotting such documentation into the manual would be very useful). For example, I use this to auto-rename all methods from "method_name" to "MethodName" for C#: %rename("%(camelcase)s",%$isfunction) ""; Cheers, Olly |