@@ -15,8 +15,8 @@ module Bindable
1515 # @example Initialize a binding.
1616 # Binding.new(base, target, association)
1717 #
18- # @param [ Document ] base The base of the binding.
19- # @param [ Document | Array<Document> ] target The target of the binding.
18+ # @param [ Mongoid:: Document ] base The base of the binding.
19+ # @param [ Mongoid:: Document | Array<Mongoid:: Document> ] target The target of the binding.
2020 # @param [ Mongoid::Association::Relatable ] association The association metadata.
2121 def initialize ( base , target , association )
2222 @_base , @_target , @_association = base , target , association
@@ -47,7 +47,7 @@ def binding
4747 # @example Check the inverse definition.
4848 # binding.check_inverse!(doc)
4949 #
50- # @param [ Document ] doc The document getting bound.
50+ # @param [ Mongoid:: Document ] doc The document getting bound.
5151 #
5252 # @raise [ Errors::InverseNotFound ] If no inverse found.
5353 def check_inverse! ( doc )
@@ -63,7 +63,7 @@ def check_inverse!(doc)
6363
6464 # Remove the associated document from the inverse's association.
6565 #
66- # @param [ Document ] doc The document to remove.
66+ # @param [ Mongoid:: Document ] doc The document to remove.
6767 def remove_associated ( doc )
6868 if inverse = _association . inverse ( doc )
6969 if _association . many?
@@ -78,7 +78,7 @@ def remove_associated(doc)
7878 #
7979 # This method removes the associated on *_many relationships.
8080 #
81- # @param [ Document ] doc The document to remove.
81+ # @param [ Mongoid:: Document ] doc The document to remove.
8282 # @param [ Symbol ] inverse The name of the inverse.
8383 def remove_associated_many ( doc , inverse )
8484 # We only want to remove the inverse association when the inverse
@@ -98,7 +98,7 @@ def remove_associated_many(doc, inverse)
9898 # This method removes associated on belongs_to and embedded_in
9999 # associations.
100100 #
101- # @param [ Document ] doc The document to remove.
101+ # @param [ Mongoid:: Document ] doc The document to remove.
102102 # @param [ Symbol ] inverse The name of the inverse.
103103 def remove_associated_in_to ( doc , inverse )
104104 # We only want to remove the inverse association when the inverse
@@ -116,7 +116,7 @@ def remove_associated_in_to(doc, inverse)
116116 # @example Bind the foreign key.
117117 # binding.bind_foreign_key(post, person._id)
118118 #
119- # @param [ Document ] keyed The document that stores the foreign key.
119+ # @param [ Mongoid:: Document ] keyed The document that stores the foreign key.
120120 # @param [ Object ] id The id of the bound document.
121121 def bind_foreign_key ( keyed , id )
122122 unless keyed . frozen?
@@ -132,7 +132,7 @@ def bind_foreign_key(keyed, id)
132132 # @example Bind the polymorphic type.
133133 # binding.bind_polymorphic_type(post, "Person")
134134 #
135- # @param [ Document ] typed The document that stores the type field.
135+ # @param [ Mongoid:: Document ] typed The document that stores the type field.
136136 # @param [ String ] name The name of the model.
137137 def bind_polymorphic_type ( typed , name )
138138 if _association . type && !typed . frozen?
@@ -148,7 +148,7 @@ def bind_polymorphic_type(typed, name)
148148 # @example Bind the polymorphic type.
149149 # binding.bind_polymorphic_inverse_type(post, "Person")
150150 #
151- # @param [ Document ] typed The document that stores the type field.
151+ # @param [ Mongoid:: Document ] typed The document that stores the type field.
152152 # @param [ String ] name The name of the model.
153153 def bind_polymorphic_inverse_type ( typed , name )
154154 if _association . inverse_type && !typed . frozen?
@@ -164,8 +164,8 @@ def bind_polymorphic_inverse_type(typed, name)
164164 # @example Bind the inverse.
165165 # binding.bind_inverse(post, person)
166166 #
167- # @param [ Document ] doc The base document.
168- # @param [ Document ] inverse The inverse document.
167+ # @param [ Mongoid:: Document ] doc The base document.
168+ # @param [ Mongoid:: Document ] inverse The inverse document.
169169 def bind_inverse ( doc , inverse )
170170 if doc . respond_to? ( _association . inverse_setter ) && !doc . frozen?
171171 try_method ( doc , _association . inverse_setter , inverse )
@@ -179,7 +179,7 @@ def bind_inverse(doc, inverse)
179179 # @example Bind the document with the base.
180180 # binding.bind_from_relational_parent(doc)
181181 #
182- # @param [ Document ] doc The document to bind.
182+ # @param [ Mongoid:: Document ] doc The document to bind.
183183 def bind_from_relational_parent ( doc )
184184 check_inverse! ( doc )
185185 remove_associated ( doc )
@@ -216,7 +216,7 @@ def set_base_association
216216 # @example Bind the document with the base.
217217 # unbinding.unbind_from_relational_parent(doc)
218218 #
219- # @param [ Document ] doc The document to unbind.
219+ # @param [ Mongoid:: Document ] doc The document to unbind.
220220 def unbind_from_relational_parent ( doc )
221221 check_inverse! ( doc )
222222 bind_foreign_key ( doc , nil )
0 commit comments