Module: AbstractReflection::ObjectMirror
- Includes:
- Mirror
- Included in:
- ClassMirror, Ruby::Reflection::ObjectMirror
- Defined in:
- lib/abstract_reflection/object_mirror.rb
Overview
A mirror class. It is the most generic mirror and should be able to reflect on any object you can get at in a given system.
Instance Method Summary (collapse)
-
- (FieldMirror) class_variables
The class variables of the object or its class.
-
- (Object) instance_eval
The instance_eval known from Ruby.
-
- (Array<ObjectMirror>) objects_with_references
Searches the system for other objects that have references to this one.
-
- (Array<ObjectMirror>, NilClass) path_to(obj)
Searches for a reference path from this object to another given object.
-
- (Class) target_class
The actual runtime class object.
-
- (Hash<ObjectMirror => Hash<...,...>>) transitive_closure
Returns the transitive closure (the full object tree under this object, without duplicates).
-
- (FieldMirror) variables
The instance variables of the object.
Methods included from Mirror
Methods included from Mirror::ClassMethods
#included, #mirror_class, #reflect, #reflect!, #reflects?, #register_mirror
Instance Method Details
- (FieldMirror) class_variables
The class variables of the object or its class
13 14 15 |
# File 'lib/abstract_reflection/object_mirror.rb', line 13 def class_variables raise CapabilitiesExceeded end |
- (Object) instance_eval
The instance_eval known from Ruby. Should return the result or a representation thereof.
45 46 |
# File 'lib/abstract_reflection/object_mirror.rb', line 45 def instance_eval end |
- (Array<ObjectMirror>) objects_with_references
Searches the system for other objects that have references to this one.
26 27 |
# File 'lib/abstract_reflection/object_mirror.rb', line 26 def objects_with_references end |
- (Array<ObjectMirror>, NilClass) path_to(obj)
Searches for a reference path from this object to another given object.
40 41 |
# File 'lib/abstract_reflection/object_mirror.rb', line 40 def path_to(obj) end |
- (Class) target_class
The actual runtime class object
18 19 20 |
# File 'lib/abstract_reflection/object_mirror.rb', line 18 def target_class raise CapabilitiesExceeded end |
- (Hash<ObjectMirror => Hash<...,...>>) transitive_closure
Returns the transitive closure (the full object tree under this object, without duplicates).
33 34 |
# File 'lib/abstract_reflection/object_mirror.rb', line 33 def transitive_closure end |
- (FieldMirror) variables
The instance variables of the object
8 9 10 |
# File 'lib/abstract_reflection/object_mirror.rb', line 8 def variables raise CapabilitiesExceeded end |