Class: CarthageCache::ArchiveInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/carthage_cache/archive_installer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(terminal, repository, archiver, project) ⇒ ArchiveInstaller

Returns a new instance of ArchiveInstaller.



10
11
12
13
14
15
# File 'lib/carthage_cache/archive_installer.rb', line 10

def initialize(terminal, repository, archiver, project)
  @terminal = terminal
  @repository = repository
  @archiver = archiver
  @project = project
end

Instance Attribute Details

#archiverObject (readonly)

Returns the value of attribute archiver.



7
8
9
# File 'lib/carthage_cache/archive_installer.rb', line 7

def archiver
  @archiver
end

#projectObject (readonly)

Returns the value of attribute project.



8
9
10
# File 'lib/carthage_cache/archive_installer.rb', line 8

def project
  @project
end

#repositoryObject (readonly)

Returns the value of attribute repository.



6
7
8
# File 'lib/carthage_cache/archive_installer.rb', line 6

def repository
  @repository
end

#terminalObject (readonly)

Returns the value of attribute terminal.



5
6
7
# File 'lib/carthage_cache/archive_installer.rb', line 5

def terminal
  @terminal
end

Instance Method Details

#installObject



17
18
19
20
# File 'lib/carthage_cache/archive_installer.rb', line 17

def install
  archive_path = download_archive
  unarchive(archive_path)
end