class PackerFiles::Core::User
Define the User
class that can handle User
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
groups[RW]
login[RW]
Specify attributes
name[RW]
password[RW]
uid[RW]
Public Class Methods
doc_file()
click to toggle source
Documentation for this class
# File lib/PackerFiles/Core/User.rb, line 24 def self.doc_file PackerFiles.DirPath('Core/example/User.txt').first end
new() { |self| ... }
click to toggle source
Constructor to just specify accessor varibales
# File lib/PackerFiles/Core/User.rb, line 29 def initialize @groups = [] yield self if block_given? end
Public Instance Methods
normalize()
click to toggle source
Normalize the various values into something useful. The default implementation checks only errors
# File lib/PackerFiles/Core/User.rb, line 36 def normalize raise NilException.new(self, 'login') if @login.nil? raise NilException.new(self, 'name') if @name.nil? raise NilException.new(self, 'password') if @password.nil? end