Created
November 9, 2011 18:46
-
-
Save daveworth/1352484 to your computer and use it in GitHub Desktop.
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
| [["websites", /website/i], ["emails", /email/i], ["phones", /phone|fax|cell/i]].each do |getter_data| | |
| data_type, regex = *getter_data |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AL: thanks! I knew the latter and I suppose it's almost identical to what I need to accomplish above. After converting to a hash then I can do
#eachand the block variables are the keys/values resp.