This class serves as a generic reference mechanism to other objects. The actual reference can be either a WeakReference, SoftReference, or StrongReference.
# File lib/ref/reference.rb, line 19 def inspect obj = object "<##{self.class.name}: #{obj ? obj.inspect : "##{referenced_object_id} (not accessible)"}>" end
Get the referenced object. This could be nil if the reference is a WeakReference or a SoftReference and the object has been reclaimed by the garbage collector.
# File lib/ref/reference.rb, line 15 def object raise NotImplementedError end
Generated with the Darkfish Rdoc Generator 2.