Module: Bosh::Stemcell::OperatingSystem

Defined in:
lib/bosh/stemcell/operating_system.rb

Defined Under Namespace

Classes: Base, Centos, Ubuntu

Class Method Summary collapse

Class Method Details

.for(operating_system_name, operating_system_version = nil) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/bosh/stemcell/operating_system.rb', line 3

def self.for(operating_system_name, operating_system_version = nil)
  case operating_system_name
    when 'centos' then Centos.new
    when 'ubuntu' then Ubuntu.new(operating_system_version)
    else raise ArgumentError.new("invalid operating system: #{operating_system_name}")
  end
end