class Fontist::Utils::GitHubUrl
Constants
- GITHUB_RELEASE_PATTERN
Public Class Methods
Source
# File lib/fontist/utils/github_url.rb, line 8 def match?(url) parse(url).matched? end
Source
# File lib/fontist/utils/github_url.rb, line 12 def parse(url) url_string = url.to_s match = url_string.match(GITHUB_RELEASE_PATTERN) if match ParsedUrl.new( owner: match[:owner], repo: match[:repo], tag: match[:tag], asset: match[:asset], original_url: url_string ) else ParsedUrl.from_non_github_url(url_string) end end