aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/qualified_token.rb
blob: 09eedef1b34e567f305ffb4dde476d63614f517a (plain)
1
2
3
4
5
6
7
8
9
10
11
module Hbc
  module QualifiedToken
    def self.parse(arg)
      return nil unless arg.is_a?(String)
      return nil unless match = arg.downcase.match(HOMEBREW_TAP_CASK_REGEX)
      user, repo, token = match.captures
      odebug "[user, repo, token] might be [#{user}, #{repo}, #{token}]"
      [user, repo, token]
    end
  end
end