Class: Bosh::Stemcell::Stemcell

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/stemcell/stemcell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Stemcell.



6
7
8
9
10
11
# File 'lib/bosh/stemcell/stemcell.rb', line 6

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

Instance Attribute Details

#base_nameObject (readonly)

Returns the value of attribute base_name.



4
5
6
# File 'lib/bosh/stemcell/stemcell.rb', line 4

def base_name
  @base_name
end

#definitionObject (readonly)

Returns the value of attribute definition.



4
5
6
# File 'lib/bosh/stemcell/stemcell.rb', line 4

def definition
  @definition
end

#disk_formatObject (readonly)

Returns the value of attribute disk_format.



4
5
6
# File 'lib/bosh/stemcell/stemcell.rb', line 4

def disk_format
  @disk_format
end

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/bosh/stemcell/stemcell.rb', line 4

def version
  @version
end

Instance Method Details

#infrastructureObject



13
14
15
# File 'lib/bosh/stemcell/stemcell.rb', line 13

def infrastructure
  @definition.infrastructure
end

#nameObject



17
18
19
# File 'lib/bosh/stemcell/stemcell.rb', line 17

def name
  ArchiveFilename.new(version, definition, base_name, disk_format).to_s
end