Class: Pod::Private::PrivateCache::BranchCache
- Inherits:
-
Object
- Object
- Pod::Private::PrivateCache::BranchCache
- Defined in:
- lib/cocoapods-modularization/private/private_cache.rb
Instance Method Summary collapse
- #branch ⇒ Object
- #git ⇒ Object
-
#initialize(key, path) ⇒ BranchCache
constructor
A new instance of BranchCache.
- #key ⇒ Object
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
#branch ⇒ Object
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 |
#git ⇒ Object
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 |
#key ⇒ Object
10 11 12 |
# File 'lib/cocoapods-modularization/private/private_cache.rb', line 10 def key @key end |