Last active
January 24, 2018 21:03
-
-
Save kjlape/596102e6264e21e915e994aedc889419 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
| def check(value) | |
| uri = URI.parse(value) rescue nil | |
| case uri | |
| when URI::HTTP, URI::HTTPS | |
| uri.host && true | |
| else | |
| false | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment