class TrackOpenInstances::OpenInstance

Represents an open instance of a class that includes TrackOpenInstances

@attr_reader [Object] instance The tracked instance @attr_reader [Array<String>] creation_stack The call stack at the time of instance creation

This is useful for debugging and identifying where the instance was created.

@api private

Attributes

creation_stack[R]
instance[R]

Public Class Methods

new(instance, creation_stack) click to toggle source

Initializes a new OpenInstance

@param instance [Object] The tracked instance @param creation_stack [Array<Thread::Backtrace::Location>] The call stack at

the time of instance creation

@return [void]

@api private

# File lib/track_open_instances.rb, line 75
def initialize(instance, creation_stack)
  @instance = instance
  @creation_stack = creation_stack
end