Exception: Exception

Defined in:
lib/textmate_backtracer.rb

Instance Method Summary collapse

Instance Method Details



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/textmate_backtracer.rb', line 49

def add_links_to_backtrace(lines)
  lines.collect do |line|
    expanded = line.gsub '#{RAILS_ROOT}', RAILS_ROOT
    if match = expanded.match(/^(.+):(\d+):in/) or match = expanded.match(/^(.+):(\d+)\s*$/)
      file = File.expand_path(match[1])
      line_number = match[2]
      html = "<a href='txmt://open?url=file://#{file}&line=#{line_number}'>#{line}</a>"
    else
      line
    end
  end
end

#clean_backtraceObject



62
63
64
# File 'lib/textmate_backtracer.rb', line 62

def clean_backtrace
  add_links_to_backtrace(original_clean_backtrace)
end

#original_clean_backtraceObject



47
# File 'lib/textmate_backtracer.rb', line 47

alias :original_clean_backtrace :clean_backtrace