class Airbrake::Truncator
def truncate(object, seen = Set.new)
-
(Object)- truncated object
Parameters:
-
seen(Set) -- The cache that helps to detect recursion -
object(Object) -- The object to truncate
def truncate(object, seen = Set.new) if seen.include?(object.object_id) return CIRCULAR if CIRCULAR_TYPES.any? { |t| object.is_a?(t) } return object end truncate_object(object, seen << object.object_id) end