Class: PuppetDebugger::InputResponders::Stacktrace
- Inherits:
-
PuppetDebugger::InputResponderPlugin
- Object
- PuppetDebugger::InputResponderPlugin
- PuppetDebugger::InputResponders::Stacktrace
- Defined in:
- lib/plugins/puppet-debugger/input_responders/stacktrace.rb
Constant Summary collapse
- COMMAND_WORDS =
%w[stacktrace].freeze
- SUMMARY =
'Show the stacktrace for how we got here'
- COMMAND_GROUP =
:tools
Instance Attribute Summary
Attributes inherited from PuppetDebugger::InputResponderPlugin
Instance Method Summary collapse
-
#run(_args = []) ⇒ Array
-
returns a array of pp files that are involved in the stacktrace.
-
-
#stacktrace ⇒ Array
-
an array of files.
-
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 = []) ⇒ Array
Returns - returns a array of pp files that are involved in the stacktrace.
12 13 14 15 |
# File 'lib/plugins/puppet-debugger/input_responders/stacktrace.rb', line 12 def run(_args = []) s = stacktrace s.empty? ? 'stacktrace not available'.warning : s.ai end |
#stacktrace ⇒ Array
Returns - an array of files.
18 19 20 |
# File 'lib/plugins/puppet-debugger/input_responders/stacktrace.rb', line 18 def stacktrace Puppet::Pops::PuppetStack.stacktrace.find_all { |line| !line.include?('unknown') } end |