Class: TrackOpenInstances::OpenInstance Private
- Inherits:
-
Object
- Object
- TrackOpenInstances::OpenInstance
- Defined in:
- lib/track_open_instances.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents an open instance of a class that includes TrackOpenInstances
Instance Attribute Summary collapse
-
#creation_stack ⇒ Array<String>
readonly
private
The call stack at the time of instance creation.
-
#instance ⇒ Object
readonly
private
The tracked instance.
Instance Method Summary collapse
-
#initialize(instance, creation_stack)
constructor
private
Initializes a new OpenInstance.
Constructor Details
#initialize(instance, creation_stack)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes a new OpenInstance
75 76 77 78 |
# File 'lib/track_open_instances.rb', line 75 def initialize(instance, creation_stack) @instance = instance @creation_stack = creation_stack end |
Instance Attribute Details
#creation_stack ⇒ Array<String> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The call stack at the time of instance creation
This is useful for debugging and identifying where the instance was created.
62 63 64 |
# File 'lib/track_open_instances.rb', line 62 def creation_stack @creation_stack end |
#instance ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The tracked instance
62 63 64 |
# File 'lib/track_open_instances.rb', line 62 def instance @instance end |