Class: Pocky::Package
- Inherits:
-
Object
- Object
- Pocky::Package
- Defined in:
- lib/pocky/package.rb
Constant Summary collapse
- DEPENDENCIES_FILENAME =
'package.yml'
- DEPRECATED_REFERENCES_FILENAME =
'deprecated_references.yml'
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#enforce_privacy ⇒ Object
readonly
Returns the value of attribute enforce_privacy.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
Instance Method Summary collapse
- #deprecated_references ⇒ Object
-
#initialize(name:, path:, primary:) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(name:, path:, primary:) ⇒ Package
Returns a new instance of Package.
12 13 14 15 16 17 18 |
# File 'lib/pocky/package.rb', line 12 def initialize(name:, path:, primary:) @name = name @path = path @primary = primary @dependencies = dependencies_yml['dependencies'] || [] @enforce_privacy = dependencies_yml['enforce_privacy'] || false end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
10 11 12 |
# File 'lib/pocky/package.rb', line 10 def dependencies @dependencies end |
#enforce_privacy ⇒ Object (readonly)
Returns the value of attribute enforce_privacy.
10 11 12 |
# File 'lib/pocky/package.rb', line 10 def enforce_privacy @enforce_privacy end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/pocky/package.rb', line 10 def name @name end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
10 11 12 |
# File 'lib/pocky/package.rb', line 10 def primary @primary end |
Instance Method Details
#deprecated_references ⇒ Object
20 21 22 |
# File 'lib/pocky/package.rb', line 20 def deprecated_references @deprecated_references ||= load_yml(deprecated_references_filename) end |