Sha256: fb6806fd47c465e5cc9a930a78388d0bba52c38a98a21ea0f41206265edcf9c1
Contents?: true
Size: 674 Bytes
Versions: 21
Compression:
Stored size: 674 Bytes
Contents
require 'puppet-debugger/input_responder_plugin' module PuppetDebugger module InputResponders class Resources < InputResponderPlugin COMMAND_WORDS = %w(resources) SUMMARY = 'List all the resources current in the catalog.' COMMAND_GROUP = :scope def run(args = []) res = debugger.scope.compiler.catalog.resources.map do |res| res.to_s.gsub(/\[/, "['").gsub(/\]/, "']") # ensure the title has quotes end if !args.first.nil? res[args.first.to_i].ai else output = "Resources not shown in any specific order\n".warning output += res.ai end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems