module QP
Copyright © 2003-2006 Kouichirou Eto, All rights reserved. This is free software with ABSOLUTELY NO WARRANTY. You can redistribute it and/or modify it under the terms of the GNU GPL 2.
Public Class Methods
ar_inspect(ar)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 12 def ar_inspect(ar) '['+ar.map {|arg| arg.inspect }.join(', ')+']' end
caller_msg(ca)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 6 def caller_msg(ca) file, linenum, msg = ca.first.split(/:([0-9]+):/) msg = $1 if /\Ain \`(.+)\'\z/ =~ msg File.basename(file)+':'+linenum.to_s+':'+msg.to_s end
qp(ca, *args)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 21 def qp(ca, *args) QP.caller_msg(ca)+"\t"+QP.ar_inspect(args) end
runtime()
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 16 def runtime $__qp_t__ = Time.now unless defined? $__qp_t__ sprintf('%.1f', Time.now - $__qp_t__) end
tp(ca, *args)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 25 def tp(ca, *args) QP.runtime+':'+QP.qp(ca, *args) end
Private Instance Methods
ar_inspect(ar)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 12 def ar_inspect(ar) '['+ar.map {|arg| arg.inspect }.join(', ')+']' end
caller_msg(ca)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 6 def caller_msg(ca) file, linenum, msg = ca.first.split(/:([0-9]+):/) msg = $1 if /\Ain \`(.+)\'\z/ =~ msg File.basename(file)+':'+linenum.to_s+':'+msg.to_s end
qp(ca, *args)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 21 def qp(ca, *args) QP.caller_msg(ca)+"\t"+QP.ar_inspect(args) end
runtime()
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 16 def runtime $__qp_t__ = Time.now unless defined? $__qp_t__ sprintf('%.1f', Time.now - $__qp_t__) end
tp(ca, *args)
click to toggle source
# File vendor/qwik/lib/qwik/qp.rb, line 25 def tp(ca, *args) QP.runtime+':'+QP.qp(ca, *args) end