class PuppetDebugger::InputResponders::Stacktrace
Constants
- COMMAND_GROUP
- COMMAND_WORDS
- SUMMARY
Public Instance Methods
run(_args = [])
click to toggle source
@return [Array]- returns a array of pp files that are involved in the stacktrace
# 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()
click to toggle source
@return [Array] - an array of files with line numbers @example [
"/nwops/puppetlabs-peadm/spec/fixtures/modules/peadm/plans/status.pp:23", "/nwops/puppetlabs-peadm/spec/fixtures/modules/peadm/plans/status.pp:20"
]
# File lib/plugins/puppet-debugger/input_responders/stacktrace.rb, line 23 def stacktrace stack = Puppet::Pops::PuppetStack.stacktrace.find_all { |line| !line.include?('unknown') } stack.each_with_object([]) do |item, acc| acc << item.join(':') end end