49: def post(method, object, exitstatus, *args)
50:
51: case object.trace_mode
52: when 1, 2
53: arrow = object.trace_mode == 1 ? "<=" : "<-"
54: if exitstatus.kind_of? Array
55: object.trace_output << "#{arrow} #{method} for #{object} = #{exitstatus[0] || 'nil'}\n"
56: else
57: if exitstatus == true
58: object.trace_output << "!! #{$!.message.chomp}\n"
59: end
60: object.trace_output << "#{arrow} #{method} for #{object}\n"
61: end
62:
63: when 3
64: if exitstatus.kind_of? Array
65: object.trace_output << "<- #{method} for #{object.inspect} = #{exitstatus[0].inspect}\n"
66: else
67: if exitstatus == true
68: object.trace_output << "!! #{$!.inspect}\n"
69: end
70: object.trace_output << "<- #{method} for #{object.inspect}\n"
71: end
72: end
73:
74: end