|
|
|
|
|
by petercooper
4995 days ago
|
|
A few things stand out as distinctive in terms of Ruby style. For example, for self.send "#{sym}=", val, I'd much prefer to see send :"#{sym}=", val. And "sym" is a poor choice of variable name semantically when it's really referring to an attribute name. 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.) |
|
1 - https://github.com/donnen/TaxCloud/blob/b036594969f045660a79...