Class: Puppet::Pops::Loaders::LoaderModuleData Private
- Defined in:
- lib/puppet/pops/loaders.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
LoaderModuleData
Information about a Module and its loaders. TODO: should have reference to real model element containing all module data; this is faking it TODO: Should use Puppet::Module to get the metadata (as a hash) - a somewhat blunt instrument, but that is
what is available with a reasonable API.
Instance Attribute Summary collapse
- #private_loader ⇒ Object private
- #public_loader ⇒ Object private
-
#puppet_module ⇒ Object
readonly
private
The Puppet::Module this LoaderModuleData represents in the loader configuration.
- #resolutions ⇒ Object private
Instance Method Summary collapse
- #dependency_names ⇒ Object private
-
#initialize(puppet_module) ⇒ LoaderModuleData
constructor
private
A new instance of LoaderModuleData.
- #name ⇒ Object private
- #path ⇒ Object private
- #resolved? ⇒ Boolean private
- #restrict_to_dependencies? ⇒ Boolean private
- #unmet_dependencies? ⇒ Boolean private
- #version ⇒ Object private
Constructor Details
#initialize(puppet_module) ⇒ LoaderModuleData
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of LoaderModuleData.
458 459 460 461 462 463 |
# File 'lib/puppet/pops/loaders.rb', line 458 def initialize(puppet_module) @puppet_module = puppet_module @resolutions = [] @public_loader = nil @private_loader = nil end |
Instance Attribute Details
#private_loader ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
450 451 452 |
# File 'lib/puppet/pops/loaders.rb', line 450 def private_loader @private_loader end |
#public_loader ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
449 450 451 |
# File 'lib/puppet/pops/loaders.rb', line 449 def public_loader @public_loader end |
#puppet_module ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The Puppet::Module this LoaderModuleData represents in the loader configuration
454 455 456 |
# File 'lib/puppet/pops/loaders.rb', line 454 def puppet_module @puppet_module end |
#resolutions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
451 452 453 |
# File 'lib/puppet/pops/loaders.rb', line 451 def resolutions @resolutions end |
Instance Method Details
#dependency_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
489 490 491 |
# File 'lib/puppet/pops/loaders.rb', line 489 def dependency_names @puppet_module.dependencies_as_modules.collect(&:name) end |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
465 466 467 |
# File 'lib/puppet/pops/loaders.rb', line 465 def name @puppet_module.name end |
#path ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
473 474 475 |
# File 'lib/puppet/pops/loaders.rb', line 473 def path @puppet_module.path end |
#resolved? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
477 478 479 |
# File 'lib/puppet/pops/loaders.rb', line 477 def resolved? !@private_loader.nil? end |
#restrict_to_dependencies? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
481 482 483 |
# File 'lib/puppet/pops/loaders.rb', line 481 def restrict_to_dependencies? @puppet_module. end |
#unmet_dependencies? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
485 486 487 |
# File 'lib/puppet/pops/loaders.rb', line 485 def unmet_dependencies? @puppet_module.unmet_dependencies.any? end |
#version ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
469 470 471 |
# File 'lib/puppet/pops/loaders.rb', line 469 def version @puppet_module.version end |