Class: CarthageCacheRes::ArchiveBuilder
- Inherits:
-
Object
- Object
- CarthageCacheRes::ArchiveBuilder
- Defined in:
- lib/carthage_cache_res/archive_builder.rb
Instance Attribute Summary collapse
-
#archiver ⇒ Object
readonly
Returns the value of attribute archiver.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
Instance Method Summary collapse
- #build(platforms = nil) ⇒ Object
-
#initialize(terminal, repository, archiver, project) ⇒ ArchiveBuilder
constructor
A new instance of ArchiveBuilder.
Constructor Details
#initialize(terminal, repository, archiver, project) ⇒ ArchiveBuilder
Returns a new instance of ArchiveBuilder.
10 11 12 13 14 15 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 10 def initialize(terminal, repository, archiver, project) @terminal = terminal @repository = repository @archiver = archiver @project = project end |
Instance Attribute Details
#archiver ⇒ Object (readonly)
Returns the value of attribute archiver.
7 8 9 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 7 def archiver @archiver end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
8 9 10 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 8 def project @project end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
6 7 8 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 6 def repository @repository end |
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
5 6 7 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 5 def terminal @terminal end |
Instance Method Details
#build(platforms = nil) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/carthage_cache_res/archive_builder.rb', line 17 def build(platforms = nil) archive_path = archive(platforms) upload_archive(archive_path) # TODO check if some old archives can be deleted # I would store the last N archives and then delete # the rest end |