Last active
April 4, 2019 21:33
-
-
Save kerrizor/bf1541af4590d6f4794db01e12a26071 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
def link_to_github(rubygem) | |
[rubygem.linkset.code, rubygem.linkset.home].detect do |linkset| | |
URI(linkset.to_s).host == "github.com" | |
end | |
rescue URI::InvalidURIError | |
nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment