Class: Puppet::Pops::Loaders::LoaderModuleData
- Defined in:
- lib/puppet/pops/loaders.rb
Overview
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
Returns the value of attribute private_loader.
-
#public_loader ⇒ Object
Returns the value of attribute public_loader.
-
#puppet_module ⇒ Object
readonly
The Puppet::Module this LoaderModuleData represents in the loader configuration.
-
#resolutions ⇒ Object
Returns the value of attribute resolutions.
Instance Method Summary collapse
- #dependency_names ⇒ Object
-
#initialize(puppet_module) ⇒ LoaderModuleData
constructor
A new instance of LoaderModuleData.
- #name ⇒ Object
- #path ⇒ Object
- #resolved? ⇒ Boolean
- #restrict_to_dependencies? ⇒ Boolean
- #unmet_dependencies? ⇒ Boolean
- #version ⇒ Object
Constructor Details
#initialize(puppet_module) ⇒ LoaderModuleData
Returns a new instance of LoaderModuleData.
319 320 321 322 323 324 |
# File 'lib/puppet/pops/loaders.rb', line 319 def initialize(puppet_module) @puppet_module = puppet_module @resolutions = [] @public_loader = nil @private_loader = nil end |
Instance Attribute Details
#private_loader ⇒ Object
Returns the value of attribute private_loader.
311 312 313 |
# File 'lib/puppet/pops/loaders.rb', line 311 def private_loader @private_loader end |
#public_loader ⇒ Object
Returns the value of attribute public_loader.
310 311 312 |
# File 'lib/puppet/pops/loaders.rb', line 310 def public_loader @public_loader end |
#puppet_module ⇒ Object (readonly)
The Puppet::Module this LoaderModuleData represents in the loader configuration
315 316 317 |
# File 'lib/puppet/pops/loaders.rb', line 315 def puppet_module @puppet_module end |
#resolutions ⇒ Object
Returns the value of attribute resolutions.
312 313 314 |
# File 'lib/puppet/pops/loaders.rb', line 312 def resolutions @resolutions end |
Instance Method Details
#dependency_names ⇒ Object
350 351 352 |
# File 'lib/puppet/pops/loaders.rb', line 350 def dependency_names @puppet_module.dependencies_as_modules.collect(&:name) end |
#name ⇒ Object
326 327 328 |
# File 'lib/puppet/pops/loaders.rb', line 326 def name @puppet_module.name end |
#path ⇒ Object
334 335 336 |
# File 'lib/puppet/pops/loaders.rb', line 334 def path @puppet_module.path end |
#resolved? ⇒ Boolean
338 339 340 |
# File 'lib/puppet/pops/loaders.rb', line 338 def resolved? !@private_loader.nil? end |
#restrict_to_dependencies? ⇒ Boolean
342 343 344 |
# File 'lib/puppet/pops/loaders.rb', line 342 def restrict_to_dependencies? @puppet_module. end |
#unmet_dependencies? ⇒ Boolean
346 347 348 |
# File 'lib/puppet/pops/loaders.rb', line 346 def unmet_dependencies? @puppet_module.unmet_dependencies.any? end |
#version ⇒ Object
330 331 332 |
# File 'lib/puppet/pops/loaders.rb', line 330 def version @puppet_module.version end |