30 Nov '17, 7pm

Refactoring Similar Nested Hash Iterations with Lambdas #ruby #rails

Today I had the opportunity to write a rake task that iterated through a few CouchDB document nested hashes. The task was simple enough; I had to remove some properties that were rendered redundant by a recent refactor in one of our applications. Pay close attention to similarities in each nested iteration as the data in the hash is more or less irrelevant to this refactor. Here is a slice of the code that was in the first version.

Full article: https://medium.com/amco/refactoring-similar-nested-hash-i...

Tweets