class PackerFiles::Core::Partition

Define the Partition class that can handle Partition specified in a Packerfile. Just the barebones attributes that are required for this class are specified here. The conversion of these attributes into a OS build specific file is done by derived classes in the OS specific directories.

Attributes

boot[RW]

Specify attributes

file_system[RW]
label[RW]
mount_point[RW]
name[RW]
size[RW]

Public Class Methods

new() { |self| ... } click to toggle source

Constructor to just specify accessor varibales

# File lib/PackerFiles/Core/Partition.rb, line 25
def initialize
  @boot         = false
  @size         = 0
  yield self if block_given?
end

Public Instance Methods

normalize() click to toggle source

Normalize the values

# File lib/PackerFiles/Core/Partition.rb, line 32
def normalize
  raise NilException.new(self, 'name')  if @name.nil?
  raise 'size cannot be zero' if @size == 0 
end