# File lib/dbi/trace.rb, line 49 def post(method, object, exitstatus, *args) case object.trace_mode when 1, 2 # return values and errors arrow = object.trace_mode == 1 ? "<=" : "<-" if exitstatus.kind_of? Array object.trace_output << "#{arrow} #{method} for #{object} = #{exitstatus[0] || 'nil'}\n" else if exitstatus == true object.trace_output << "!! #{$!.message.chomp}\n" end object.trace_output << "#{arrow} #{method} for #{object}\n" end when 3 if exitstatus.kind_of? Array object.trace_output << "<- #{method} for #{object.inspect} = #{exitstatus[0].inspect}\n" else if exitstatus == true object.trace_output << "!! #{$!.inspect}\n" end object.trace_output << "<- #{method} for #{object.inspect}\n" end end end
trace methods --------------------------------------------------------------
# File lib/dbi/trace.rb, line 38 def pre(method, object, exitstatus, *args) par = args.collect{|a| a.inspect}.join(", ") if object.trace_mode == 2 then object.trace_output << "-> #{method} for #{object} (#{par})\n" elsif object.trace_mode == 3 then object.trace_output << "-> #{method} for #{object.inspect} (#{par})\n" end end
Generated with the Darkfish Rdoc Generator 2.