Class: PuppetParse::Runner
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run(files) ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
4 5 |
# File 'lib/puppet-parse/runner.rb', line 4 def initialize end |
Instance Method Details
#run(files) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet-parse/runner.rb', line 7 def run(files) output = {} files.each do |file| content = PuppetParse::Parser.new(file) next if content.instance_variable_get('@object').nil? parameters = (defined? content.parameters) ? content.parameters.paramflat : nil result = { content.klass => { 'parameters' => parameters, 'docs' => content.docs } } output = output.merge(result) end output end |