Class: Pod::Private::PrivateCache::BranchCache

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-modularization/private/private_cache.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, path) ⇒ BranchCache

Returns a new instance of BranchCache.



5
6
7
8
# File 'lib/cocoapods-modularization/private/private_cache.rb', line 5

def initialize(key, path)
  @key = key
  @path = path
end

Instance Method Details

#branchObject



19
20
21
22
# File 'lib/cocoapods-modularization/private/private_cache.rb', line 19

def branch
  branch = `git -C #{@path} rev-parse --abbrev-ref HEAD`
  branch.strip if branch
end

#gitObject



14
15
16
17
# File 'lib/cocoapods-modularization/private/private_cache.rb', line 14

def git
  git = `git -C #{@path} remote get-url origin`
  git.strip if git
end

#keyObject



10
11
12
# File 'lib/cocoapods-modularization/private/private_cache.rb', line 10

def key
  @key
end