Method: Contrast::Agent::Assess::Finalizers::Hash#tracked?

Defined in:
lib/contrast/agent/assess/finalizers/hash.rb

#tracked?(key) ⇒ Boolean

Determine if the given Object is tracked, meaning it has a known set of properties and those properties are tracked.

Parameters:

  • key (Object)

    the Object whose properties, by id, we want to check for tracked status

Returns:

  • (Boolean)


65
66
67
# File 'lib/contrast/agent/assess/finalizers/hash.rb', line 65

def tracked? key
  key?(key.__id__) && fetch(key.__id__, nil)&.tracked?
end