lib/debug_helper/handler.rb in debug_helper-1.8.0 vs lib/debug_helper/handler.rb in debug_helper-2.0.0

- old
+ new

@@ -27,14 +27,17 @@ raise NoMethodError.new(message, method) end args = call_info if args.empty? value = obj.send(method) + key = "#{obj.class.name}##{method.to_s}" else value = obj.send(method, *args) + arglist = args.collect {|arg| arg.inspect}.join(', ') + key = "#{obj.class.name}##{method.to_s}(#{arglist})" end - content.store(method.to_s, value) + content.store(key, value) end calls_for_class.each do |call_info| klass = Object.const_get(obj.class.name) method = call_info.shift unless klass.respond_to?(method) @@ -42,13 +45,16 @@ raise NoMethodError.new(message, method) end args = call_info if args.empty? value = klass.send(method) + key = "#{klass}.#{method.to_s}" else value = klass.send(method, *args) + arglist = args.collect {|arg| arg.inspect}.join(', ') + key = "#{klass}.#{method.to_s}(#{arglist})" end - content.store(method.to_s, value) + content.store(key, value) end if each_with_index? obj.each_with_index do |item, i| self.content.store("Element #{i}", show_method.call(item, nil, {})) end \ No newline at end of file