From: "Jimmy C." Date: 2010-12-28T14:10:56+09:00 Subject: Re: to_lang: my first gem, looking for feedback Benoit Daloze wrote in post #970986: > You might be aware, but there is already a Google translate gem: > https://github.com/caius/gtranslate I actually had not seen that one. I was aware of the rtranslate gem, but gtranslate seems more similar to mine. I did this mostly as a learning exercise so it's all right with me that something similar already exists. My gem also uses a newer version of the GT API. > It seems very well documented and the code is fine IMO. > > For the API, I prefer "org_to_dst" to "to_dst_from_org", but that is > personal. I thought about this, and you're right that to_dst_from_org reads strangely. I will likely add dynamic methods for the reverse-ordered version in the future so people can use whichever they prefer. > A detail, but > You define String#{method_missing,respond_to?}, and might override > these methods if they were defined by another library. > You should probably copy the old method with alias, and call it > instead of super. Good advice. Added here: https://github.com/jimmycuadra/to_lang/commit/c6966bb6394f79d4383fbf4e9b0861e4cb7df3af Thanks very much for your input, Benoit! -- Posted via http://www.ruby-forum.com/.