Class: PackerFiles::Debian::Apt
- Inherits:
-
Core::Base
- Object
- Core::Base
- PackerFiles::Debian::Apt
- Defined in:
- lib/PackerFiles/OS/Debian/Apt.rb
Instance Attribute Summary collapse
-
#contrib ⇒ Object
Returns the value of attribute contrib.
-
#kernel ⇒ Object
Returns the value of attribute kernel.
-
#non_free ⇒ Object
Returns the value of attribute non_free.
-
#tasks ⇒ Object
Accessors.
-
#upgrades ⇒ Object
Returns the value of attribute upgrades.
Class Method Summary collapse
-
.doc_file ⇒ Object
Documentation for this class.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Apt
constructor
Constructor.
-
#normalize ⇒ Object
Normalize.
Constructor Details
#initialize {|_self| ... } ⇒ Apt
Constructor
24 25 26 27 28 29 30 31 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 24 def initialize @tasks = [] @non_free = false @contrib = false @upgrades = 'none' @kernel = 'linux-server' yield self if block_given? end |
Instance Attribute Details
#contrib ⇒ Object
Returns the value of attribute contrib.
14 15 16 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 14 def contrib @contrib end |
#kernel ⇒ Object
Returns the value of attribute kernel.
16 17 18 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 16 def kernel @kernel end |
#non_free ⇒ Object
Returns the value of attribute non_free.
13 14 15 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 13 def non_free @non_free end |
#tasks ⇒ Object
Accessors
12 13 14 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 12 def tasks @tasks end |
#upgrades ⇒ Object
Returns the value of attribute upgrades.
15 16 17 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 15 def upgrades @upgrades end |
Class Method Details
.doc_file ⇒ Object
Documentation for this class
19 20 21 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 19 def self.doc_file PackerFiles.DirPath('Debian/example/Apt.txt').first end |
Instance Method Details
#normalize ⇒ Object
Normalize
34 35 36 37 38 |
# File 'lib/PackerFiles/OS/Debian/Apt.rb', line 34 def normalize raise Core::NilException.new(self, 'tasks') if @tasks.nil? raise Core::NilException.new(self, 'kernel') if @kernel.nil? raise Core::EmptyArrayException.new(self, 'tasks') if @tasks.empty? end |