Last active
December 24, 2015 08:59
-
-
Save ashmckenzie/6774234 to your computer and use it in GitHub Desktop.
Create the smallest solution to take the given data hash and produce the desired output (using pure Ruby stdlib)
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
# Source data | |
# | |
data = { | |
name: 'John Smith', | |
age: 45, | |
address: '123 Here St', | |
email: '[email protected]' | |
} | |
# Code here.. | |
# Desired output | |
# | |
# {:name=>"John Smith", :email=>"[email protected]"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the winning solution*
*assuming you're using my personally-patched ruby