Class: BB::Cache
- Inherits:
-
Object
- Object
- BB::Cache
- Defined in:
- lib/cocoapods-bb-PodAssistant/config/cache_path.rb
Instance Method Summary collapse
- #cachePath ⇒ Object
-
#initialize(stable_source = nil, verify_stable_env = true) ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize(stable_source = nil, verify_stable_env = true) ⇒ Cache
Returns a new instance of Cache.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cocoapods-bb-PodAssistant/config/cache_path.rb', line 6 def initialize(stable_source = nil, verify_stable_env=true) if stable_source.nil? stable_source = StableSource.stable_default_source end @stable_source = stable_source if verify_stable_env && File.exist?(File.join(Pathname.pwd, "Podfile")) @bundleId = BB::PodUtils.getProjectBundleIdentifier end if @bundleId.nil? @bundleId = 'stable' end end |
Instance Method Details
#cachePath ⇒ Object
19 20 21 22 |
# File 'lib/cocoapods-bb-PodAssistant/config/cache_path.rb', line 19 def cachePath() # 缓存路径采用bundle包名区分,解决多产品同时打包问题 File.join(File.('~/.cache'), 'cocoapods-bb-PodAssistant',@bundleId,@stable_source.split('/').last.chomp('.git').to_s) end |