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.
Instance Method Summary collapse
- #archive_filename ⇒ Object
- #archive_key ⇒ Object
- #carthage_build_directory ⇒ Object
-
#initialize(project_path, cache_dir_name, terminal) ⇒ Project
constructor
A new instance of Project.
- #tmpdir ⇒ Object
Constructor Details
#initialize(project_path, cache_dir_name, terminal) ⇒ Project
Returns a new instance of Project.
10 11 12 13 14 15 |
# File 'lib/carthage_cache/project.rb', line 10 def initialize(project_path, cache_dir_name, terminal) @project_path = project_path @cache_dir_name = cache_dir_name @terminal = terminal @cartfile = CartfileResolvedFile.new(cartfile_resolved_path) 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 |
Instance Method Details
#archive_filename ⇒ Object
17 18 19 |
# File 'lib/carthage_cache/project.rb', line 17 def archive_filename @archive_filename ||= "#{archive_key}.zip" end |
#archive_key ⇒ Object
21 22 23 |
# File 'lib/carthage_cache/project.rb', line 21 def archive_key cartfile.digest end |
#carthage_build_directory ⇒ Object
29 30 31 |
# File 'lib/carthage_cache/project.rb', line 29 def carthage_build_directory @carthage_build_directory ||= File.join(project_path, "Carthage", "Build") end |
#tmpdir ⇒ Object
25 26 27 |
# File 'lib/carthage_cache/project.rb', line 25 def tmpdir @tmpdir ||= create_tmpdir end |