Class: Contrast::Utils::Assess::TrackingUtil

Inherits:
Object
  • Object
show all
Extended by:
Components::Logger::InstanceMethods
Defined in:
lib/contrast/utils/assess/tracking_util.rb

Overview

TrackingUtil has methods for determining if a object is being tracked

Class Method Summary collapse

Methods included from Components::Logger::InstanceMethods

cef_logger, logger

Class Method Details

.trackable?(obj) ⇒ Boolean

Public interface to our tracking check, isolating the internals required for recursion.

Parameters:

  • obj (Object)

    the thing to check if tracked

Returns:

  • (Boolean)

    if the obj, or something in it if a collection, is tracked.



32
33
34
# File 'lib/contrast/utils/assess/tracking_util.rb', line 32

def trackable? obj
  _trackable?(obj, 0)
end

.tracked?(obj) ⇒ Boolean

Public interface to our tracking check, isolating the internals required for recursion.

Parameters:

  • obj (Object)

    the thing to check if tracked

Returns:

  • (Boolean)

    if the obj, or something in it if a collection, is tracked.



22
23
24
# File 'lib/contrast/utils/assess/tracking_util.rb', line 22

def tracked? obj
  _tracked?(obj, 0)
end