Class: Debian::Build::AbstractPackage
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Debian::Build::AbstractPackage
- Extended by:
- BuildDirectoryMethods
- Includes:
- HelperMethods
- Defined in:
- lib/debian/build/abstract_package.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exclude_from_build ⇒ Object
Returns the value of attribute exclude_from_build.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#package ⇒ Object
Returns the value of attribute package.
Instance Method Summary collapse
- #default_platforms ⇒ Object
- #init ⇒ Object
-
#initialize(name) {|_self| ... } ⇒ AbstractPackage
constructor
A new instance of AbstractPackage.
- #requires_sources? ⇒ Boolean
- #to_s ⇒ Object
Methods included from BuildDirectoryMethods
build_directory, build_directory=
Methods included from HelperMethods
Constructor Details
#initialize(name) {|_self| ... } ⇒ AbstractPackage
Returns a new instance of AbstractPackage.
18 19 20 21 22 23 24 25 26 |
# File 'lib/debian/build/abstract_package.rb', line 18 def initialize(name) @name = @package = name init yield self if block_given? define Debian::Build.packages << self end |
Instance Attribute Details
#exclude_from_build ⇒ Object
Returns the value of attribute exclude_from_build.
16 17 18 |
# File 'lib/debian/build/abstract_package.rb', line 16 def exclude_from_build @exclude_from_build end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/debian/build/abstract_package.rb', line 15 def name @name end |
#package ⇒ Object
Returns the value of attribute package.
16 17 18 |
# File 'lib/debian/build/abstract_package.rb', line 16 def package @package end |
Instance Method Details
#default_platforms ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/debian/build/abstract_package.rb', line 31 def default_platforms unless exclude_from_build Platform.all else Platform.all.reject do |platform| platform.to_s.match exclude_from_build end end end |
#init ⇒ Object
28 29 |
# File 'lib/debian/build/abstract_package.rb', line 28 def init end |
#requires_sources? ⇒ Boolean
41 42 43 |
# File 'lib/debian/build/abstract_package.rb', line 41 def requires_sources? true end |
#to_s ⇒ Object
45 46 47 |
# File 'lib/debian/build/abstract_package.rb', line 45 def to_s name.to_s end |