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.
467 468 469 470 471 472 |
# File 'lib/puppet/pops/loaders.rb', line 467 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.
459 460 461 |
# File 'lib/puppet/pops/loaders.rb', line 459 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.
458 459 460 |
# File 'lib/puppet/pops/loaders.rb', line 458 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
463 464 465 |
# File 'lib/puppet/pops/loaders.rb', line 463 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.
460 461 462 |
# File 'lib/puppet/pops/loaders.rb', line 460 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.
498 499 500 |
# File 'lib/puppet/pops/loaders.rb', line 498 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.
474 475 476 |
# File 'lib/puppet/pops/loaders.rb', line 474 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.
482 483 484 |
# File 'lib/puppet/pops/loaders.rb', line 482 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.
486 487 488 |
# File 'lib/puppet/pops/loaders.rb', line 486 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.
490 491 492 |
# File 'lib/puppet/pops/loaders.rb', line 490 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.
494 495 496 |
# File 'lib/puppet/pops/loaders.rb', line 494 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.
478 479 480 |
# File 'lib/puppet/pops/loaders.rb', line 478 def version @puppet_module.version end |