Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit 4aee4a6

Browse files
author
Brian Durand
committed
update rdoc with correct namespace in example code
1 parent 9d823cc commit 4aee4a6

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

lib/ref/mock.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ module Ref
66
#
77
# Example usage:
88
#
9-
# References::Mock.use do
9+
# Ref::Mock.use do
1010
# obj = Object.new
11-
# ref = References::WeakReference.new(obj)
11+
# ref = Ref::WeakReference.new(obj)
1212
# ref.object # obj
13-
# References::Mock.gc(obj) # mimics the garbage collector reclaiming the referenced object
13+
# Ref::Mock.gc(obj) # mimics the garbage collector reclaiming the referenced object
1414
# ref.object # nil
1515
# end
1616
module Mock

lib/ref/reference_queue.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ module Ref
1313
#
1414
# === Example usage:
1515
#
16-
# class MyRef < References::WeakReference
16+
# class MyRef < Ref::WeakReference
1717
# def cleanup
1818
# # Do something...
1919
# end
2020
# end
2121
#
22-
# queue = References::ReferenceQueue.new
22+
# queue = Ref::ReferenceQueue.new
2323
# ref = MyRef.new(Object.new)
2424
# queue.monitor(ref)
2525
# queue.shift # = nil

lib/ref/soft_key_map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Ref
1010
#
1111
# === Example usage:
1212
#
13-
# cache = References::SoftKeyMap.new
13+
# cache = Ref::SoftKeyMap.new
1414
# obj = MyObject.find_by_whatever
1515
# obj_info = Service.lookup_object_info(obj)
1616
# cache[obj] = Service.lookup_object_info(obj)

lib/ref/soft_reference.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Ref
99
# === Example usage:
1010
#
1111
# foo = Object.new
12-
# ref = References::SoftReference.new(foo)
12+
# ref = Ref::SoftReference.new(foo)
1313
# ref.object # should be foo
1414
# ObjectSpace.garbage_collect
1515
# ref.object # should be foo

lib/ref/soft_value_map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Ref
1010
#
1111
# === Example usage:
1212
#
13-
# cache = References::SoftValueMap.new
13+
# cache = Ref::SoftValueMap.new
1414
# foo = "foo"
1515
# cache["strong"] = foo # add a value with a strong reference
1616
# cache["soft"] = "bar" # add a value without a strong reference

lib/ref/weak_key_map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Ref
1010
#
1111
# === Example usage:
1212
#
13-
# cache = References::WeakKeyMap.new
13+
# cache = Ref::WeakKeyMap.new
1414
# obj = MyObject.find_by_whatever
1515
# obj_info = Service.lookup_object_info(obj)
1616
# cache[obj] = Service.lookup_object_info(obj)

lib/ref/weak_reference.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Ref
66
# === Example usage:
77
#
88
# foo = Object.new
9-
# ref = References::WeakReference.new(foo)
9+
# ref = Ref::WeakReference.new(foo)
1010
# ref.object # should be foo
1111
# ObjectSpace.garbage_collect
1212
# ref.object # should be nil

lib/ref/weak_value_map.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Ref
1010
#
1111
# === Example usage:
1212
#
13-
# cache = References::WeakValueMap.new
13+
# cache = Ref::WeakValueMap.new
1414
# foo = "foo"
1515
# cache["strong"] = foo # add a value with a strong reference
1616
# cache["weak"] = "bar" # add a value without a strong reference

0 commit comments

Comments
 (0)