Class: Bosh::Stemcell::ArchiveFilename

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/bosh/stemcell/archive_filename.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, definition, base_name, disk_format) ⇒ ArchiveFilename

Returns a new instance of ArchiveFilename.


8
9
10
11
12
13
# File 'lib/bosh/stemcell/archive_filename.rb', line 8

def initialize(version, definition, base_name, disk_format)
  @version = version
  @definition = definition
  @base_name = base_name
  @disk_format = disk_format
end

Instance Method Details

#to_sObject


15
16
17
18
19
20
21
22
23
# File 'lib/bosh/stemcell/archive_filename.rb', line 15

def to_s
  stemcell_filename_parts = [
    name,
    version,
    definition.stemcell_name(disk_format)
  ]

  "#{stemcell_filename_parts.join('-')}.tgz"
end