Class: PuppetfileFixturesGenerator::Puppetfile
- Inherits:
-
Object
- Object
- PuppetfileFixturesGenerator::Puppetfile
- Defined in:
- lib/puppetfile_fixtures_generator/puppetfile.rb
Overview
Manipulate Puppetfiles so they can be converted to fixtures or diffed
Instance Method Summary collapse
-
#initialize(puppetfile_path) ⇒ Puppetfile
constructor
Constructor.
-
#modules_hash ⇒ Hash
Modules from the Puppetfile.
Constructor Details
#initialize(puppetfile_path) ⇒ Puppetfile
Constructor
10 11 12 |
# File 'lib/puppetfile_fixtures_generator/puppetfile.rb', line 10 def initialize(puppetfile_path) @pf_path = puppetfile_path end |
Instance Method Details
#modules_hash ⇒ Hash
Returns Modules from the Puppetfile.
15 16 17 18 19 20 21 22 |
# File 'lib/puppetfile_fixtures_generator/puppetfile.rb', line 15 def modules_hash @modules_hash ||= begin hash = {} puppetfile.modules.each { |mod| module_builder(mod, hash) } hash end end |