Created
December 14, 2018 19:51
-
-
Save pgwillia/54371bf716c0301aaa81f203328d034e to your computer and use it in GitHub Desktop.
This file contains 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
[16] pry(main)> icons = "\n \n 6665\n 165\n ualib-logo.png\n licensed for U of A\n https://www.library.ualberta.ca/about-u | |
s/policies/restricted-resource-info\n 11710698\n 6665\n \n \n \n 15484\n 165\n cou-user.png\n User Registratio | |
n Required\n https://www.library.ualberta.ca/about-us/policies/conditions-of-use/registration-required\n 11710698\n 15484\n \n \ | |
n \n 15485\n 165\n cou-sign-in.png\n CCID Login Required\n https://www.library.ualberta.ca/about-us/policies/conditions-of- | |
use/restricted\n 11710698\n 15485\n \n \n " | |
=> "\n \n 6665\n 165\n ualib-logo.png\n licensed for U of A\n https://www.library.ualberta.ca/about-us/policies/restricted | |
-resource-info\n 11710698\n 6665\n \n \n \n 15484\n 165\n cou-user.png\n User Registration Required\n htt | |
ps://www.library.ualberta.ca/about-us/policies/conditions-of-use/registration-required\n 11710698\n 15484\n \n \n \n 15485\n | |
165\n cou-sign-in.png\n CCID Login Required\n https://www.library.ualberta.ca/about-us/policies/conditions-of-use/restricted\n | |
11710698\n 15485\n \n \n " | |
[17] pry(main)> icons = icons.split("\n") | |
[18] pry(main)> icons.reject! { |item| item.blank? } | |
[19] pry(main)> icons = icons.map { |item| item.strip } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment