Class: PuppetDebugger::InputResponders::Types
- Inherits:
-
PuppetDebugger::InputResponderPlugin
- Object
- PuppetDebugger::InputResponderPlugin
- PuppetDebugger::InputResponders::Types
- Defined in:
- lib/plugins/puppet-debugger/input_responders/types.rb
Constant Summary collapse
- COMMAND_WORDS =
%w(types)
- SUMMARY =
'List all the types available in the environment.'
- COMMAND_GROUP =
:environment
Instance Attribute Summary
Attributes inherited from PuppetDebugger::InputResponderPlugin
Instance Method Summary collapse
-
#run(args = []) ⇒ Object
if a error occurs we we run the types function again.
- #types ⇒ Object
Methods inherited from PuppetDebugger::InputResponderPlugin
command_completion, command_group, command_words, details, execute, #modules_paths, #puppet_debugger_lib_dir, summary
Instance Method Details
#run(args = []) ⇒ Object
if a error occurs we we run the types function again
11 12 13 |
# File 'lib/plugins/puppet-debugger/input_responders/types.rb', line 11 def run(args = []) types end |
#types ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/plugins/puppet-debugger/input_responders/types.rb', line 15 def types loaded_types = [] begin # this loads all the types, if already loaded the file is skipped Puppet::Type.loadall Puppet::Type.eachtype do |t| next if t.name == :component loaded_types << t.name.to_s end loaded_types.ai rescue Puppet::Error => e puts e..red Puppet.info(e.) # prevent more than two calls and recursive loop return if caller_locations(1, 10).find_all { |f| f.label == 'types' }.count > 2 types end end |