Class: Bosh::Stemcell::OperatingSystem::Base

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

Direct Known Subclasses

Centos, Ubuntu

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



14
15
16
17
# File 'lib/bosh/stemcell/operating_system.rb', line 14

def initialize(options = {})
  @name = options.fetch(:name)
  @version = options.fetch(:version, nil)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#==(other) ⇒ Object



19
20
21
# File 'lib/bosh/stemcell/operating_system.rb', line 19

def ==(other)
  name == other.name
end