Sha256: 177a811dfe756909f7d5f03a17ec848884a88f6ad4f9e626d8798dbc622d1f07
Contents?: true
Size: 579 Bytes
Versions: 5
Compression:
Stored size: 579 Bytes
Contents
module CodeBuddy class Stack attr_reader :stack_frames attr_accessor :selected def initialize(exception_or_string) if exception_or_string.is_a?(Exception) backtrace = exception_or_string.backtrace backtrace = backtrace.first.split("\n") if backtrace.size == 1 #haml errors come through this way else backtrace = exception_or_string end @stack_frames = backtrace.collect do |string| StackFrame.new(string) end end def edit(index) @stack_frames[index].open_in_editor end end end
Version data entries
5 entries across 5 versions & 1 rubygems