lib/vedeu/support/trace.rb in vedeu-0.4.18 vs lib/vedeu/support/trace.rb in vedeu-0.4.19
- old
+ new
@@ -1,17 +1,12 @@
-require 'vedeu/configuration/configuration'
-require 'vedeu/output/esc'
-require 'vedeu/support/log'
-
module Vedeu
# :nocov:
# This class currently provides the means to trace each method call which
# occurs inside Vedeu. This is very useful (to me!) for debugging. Running
# this will make your application less responsive, and the tests
# excruciatingly slow to run.
- #
class Trace
# @todo
# Replace this class with this:
#
@@ -46,15 +41,19 @@
# - (class_count) a count of classes registered with Vedeu,
# - (classname) the class name being traced,
# - (id) the method name being traced,
# - (vars) any local variables belonging to the method.
#
+ # @note
+ # Arguments to set_trace_func proc:
+ # |event, file, line, id, binding, name|
+ #
# @todo Deprecate, and use TracePoint instead.
#
# @return [NilClass|String]
def trace
- set_trace_func proc { |event, _file, _line, id, binding, name|
+ set_trace_func proc { |event, _, _, id, binding, name|
if event == watched && id != :log && classes.include?(name.to_s)
vars = variables(binding)
if vars.empty?
log_this(format('%s %-25s #%-20s', count, name, id))
@@ -161,10 +160,10 @@
#
# @todo Vedeu should produce this set.
#
# @return [Set]
def vedeu_exceptions
- Vedeu::Exceptions.to_set
+ Vedeu::EXCEPTIONS.to_set
end
# Returns a set of classes to ignore during tracing.
#
# @todo Make this configurable at runtime.