Sha256: bdb5292afaea48a0ea72e5a12260d45e08d4ad509b9ab1e52e49d52e05ad29c6
Contents?: true
Size: 634 Bytes
Versions: 7
Compression:
Stored size: 634 Bytes
Contents
=begin rdoc Vmx file creator Usage: Vmx.new({ :name => "MyPP", :vmx_disk => { :image_size => "2G" }, :base_directory => "/tmp/vmx" }).compile =end class Vmx include Dslify default_options( :name => "PoolParty", :base_directory => "~/Documents/Virtual\ Machines.localized" ) def initialize(o={}) dsl_options o @vmx_file = VmxFile.new o @vmx_disk = VmxDisk.new o end def compile ::FileUtils.mkdir_p "#{base_directory}/#{options[:name]}" vmdk = @vmx_disk.compile @vmx_file.set("ide0:0.fileName", vmdk) @vmx_file.compile end end
Version data entries
7 entries across 7 versions & 3 rubygems