Re:How TaxCloud Stole My Code and How I'm Doing Something Ab...
by drewtemp on Sunday October 14, 2012 @07:42AM
(#4651244)
Valid point. When I first looked at the code I knew the initialize code was fairly common, but then I noticed the unnecessary require. I started to explore a bit more and noticed that the style changes from the copied code[1]. They also place their require statements immediately after module declaration[1]. Not to mention the use of single quotes vs double quotes.
1 - https://github.com/donnen/TaxCloud/blob/b036594969f045660a79...
If I were writing this, I'd probably have a single hash that defines the SOAP names and internal names then dynamically create those accessors and dynamically create the hash in to_hash rather than have repetition. DRY and all that. So there are other ways to go about it.
There's not a great deal to go on, of course, but the chance of two independent Rubyists stumbling across an identical solution syntax-wise is far from high (though is not minuscule, either.)