Class: CarthageCache::Project
- Inherits:
-
Object
- Object
- CarthageCache::Project
- Defined in:
- lib/carthage_cache/project.rb
Instance Attribute Summary collapse
-
#cache_dir_name ⇒ Object
readonly
Returns the value of attribute cache_dir_name.
-
#cartfile ⇒ Object
readonly
Returns the value of attribute cartfile.
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
-
#tmpdir_base_path ⇒ Object
readonly
Returns the value of attribute tmpdir_base_path.
Instance Method Summary collapse
- #archive_filename ⇒ Object
- #archive_key ⇒ Object
- #carthage_build_directory ⇒ Object
-
#initialize(project_path, cache_dir_name, terminal, tmpdir, swift_version_resolver = SwiftVersionResolver.new) ⇒ Project
constructor
A new instance of Project.
- #tmpdir ⇒ Object
Constructor Details
#initialize(project_path, cache_dir_name, terminal, tmpdir, swift_version_resolver = SwiftVersionResolver.new) ⇒ Project
Returns a new instance of Project.
11 12 13 14 15 16 17 |
# File 'lib/carthage_cache/project.rb', line 11 def initialize(project_path, cache_dir_name, terminal, tmpdir, swift_version_resolver = SwiftVersionResolver.new) @project_path = project_path @cache_dir_name = cache_dir_name @terminal = terminal @tmpdir_base_path = tmpdir @cartfile = CartfileResolvedFile.new(cartfile_resolved_path, swift_version_resolver) end |
Instance Attribute Details
#cache_dir_name ⇒ Object (readonly)
Returns the value of attribute cache_dir_name.
7 8 9 |
# File 'lib/carthage_cache/project.rb', line 7 def cache_dir_name @cache_dir_name end |
#cartfile ⇒ Object (readonly)
Returns the value of attribute cartfile.
5 6 7 |
# File 'lib/carthage_cache/project.rb', line 5 def cartfile @cartfile end |
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
6 7 8 |
# File 'lib/carthage_cache/project.rb', line 6 def project_path @project_path end |
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
8 9 10 |
# File 'lib/carthage_cache/project.rb', line 8 def terminal @terminal end |
#tmpdir_base_path ⇒ Object (readonly)
Returns the value of attribute tmpdir_base_path.
9 10 11 |
# File 'lib/carthage_cache/project.rb', line 9 def tmpdir_base_path @tmpdir_base_path end |
Instance Method Details
#archive_filename ⇒ Object
19 20 21 |
# File 'lib/carthage_cache/project.rb', line 19 def archive_filename @archive_filename ||= "#{archive_key}.zip" end |
#archive_key ⇒ Object
23 24 25 |
# File 'lib/carthage_cache/project.rb', line 23 def archive_key cartfile.digest end |
#carthage_build_directory ⇒ Object
31 32 33 |
# File 'lib/carthage_cache/project.rb', line 31 def carthage_build_directory @carthage_build_directory ||= File.join(project_path, "Carthage", "Build") end |
#tmpdir ⇒ Object
27 28 29 |
# File 'lib/carthage_cache/project.rb', line 27 def tmpdir @tmpdir ||= create_tmpdir end |