Created
April 5, 2015 04:19
-
-
Save makevoid/e72c4287ecc2c22754ed to your computer and use it in GitHub Desktop.
Transproc example - Why are you still using activesupport?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T_FOO = Transproc(:hash_recursion, Transproc(:symbolize_keys)) + Transproc(:hash_recursion, Transproc(:map_hash, foo: :bar)) | |
| T_FOO.( foo: "baz", child: { "foo" => "asd" } ) | |
| # => | |
| # {:child=>{:bar=>"asd"}, :bar=>"baz"} | |
| # quiz: try to refactor the example using function composition :D | |
| # see the readme (https://github.com/solnic/transproc) and the specs (https://github.com/solnic/transproc/tree/master/spec/integration) for more infos |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see the readme (https://github.com/solnic/transproc) and the specs (https://github.com/solnic/transproc/tree/master/spec/integration) for more infos