Module: Hbc::QualifiedToken

Defined in:
Library/Homebrew/cask/lib/hbc/qualified_token.rb

Class Method Summary collapse

Class Method Details

.parse(arg) ⇒ Object



3
4
5
6
7
8
9
# File 'Library/Homebrew/cask/lib/hbc/qualified_token.rb', line 3

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