@@ -14,8 +14,8 @@ module Bindable
1414 # @example Initialize a binding.
1515 # Binding.new(base, target, association)
1616 #
17- # @param [ Document ] base The base of the binding.
18- # @param [ Document | Array<Document> ] target The target of the binding.
17+ # @param [ Mongoid:: Document ] base The base of the binding.
18+ # @param [ Mongoid:: Document | Array<Mongoid:: Document> ] target The target of the binding.
1919 # @param [ Mongoid::Association::Relatable ] association The association metadata.
2020 def initialize ( base , target , association )
2121 @_base , @_target , @_association = base , target , association
@@ -46,7 +46,7 @@ def binding
4646 # @example Check the inverse definition.
4747 # binding.check_inverse!(doc)
4848 #
49- # @param [ Document ] doc The document getting bound.
49+ # @param [ Mongoid:: Document ] doc The document getting bound.
5050 #
5151 # @raise [ Errors::InverseNotFound ] If no inverse found.
5252 def check_inverse! ( doc )
@@ -62,7 +62,7 @@ def check_inverse!(doc)
6262
6363 # Remove the associated document from the inverse's association.
6464 #
65- # @param [ Document ] doc The document to remove.
65+ # @param [ Mongoid:: Document ] doc The document to remove.
6666 def remove_associated ( doc )
6767 if inverse = _association . inverse ( doc )
6868 if _association . many?
@@ -77,7 +77,7 @@ def remove_associated(doc)
7777 #
7878 # This method removes the associated on *_many relationships.
7979 #
80- # @param [ Document ] doc The document to remove.
80+ # @param [ Mongoid:: Document ] doc The document to remove.
8181 # @param [ Symbol ] inverse The name of the inverse.
8282 def remove_associated_many ( doc , inverse )
8383 # We only want to remove the inverse association when the inverse
@@ -97,7 +97,7 @@ def remove_associated_many(doc, inverse)
9797 # This method removes associated on belongs_to and embedded_in
9898 # associations.
9999 #
100- # @param [ Document ] doc The document to remove.
100+ # @param [ Mongoid:: Document ] doc The document to remove.
101101 # @param [ Symbol ] inverse The name of the inverse.
102102 def remove_associated_in_to ( doc , inverse )
103103 # We only want to remove the inverse association when the inverse
@@ -115,7 +115,7 @@ def remove_associated_in_to(doc, inverse)
115115 # @example Bind the foreign key.
116116 # binding.bind_foreign_key(post, person._id)
117117 #
118- # @param [ Document ] keyed The document that stores the foreign key.
118+ # @param [ Mongoid:: Document ] keyed The document that stores the foreign key.
119119 # @param [ Object ] id The id of the bound document.
120120 def bind_foreign_key ( keyed , id )
121121 unless keyed . frozen?
@@ -131,7 +131,7 @@ def bind_foreign_key(keyed, id)
131131 # @example Bind the polymorphic type.
132132 # binding.bind_polymorphic_type(post, "Person")
133133 #
134- # @param [ Document ] typed The document that stores the type field.
134+ # @param [ Mongoid:: Document ] typed The document that stores the type field.
135135 # @param [ String ] name The name of the model.
136136 def bind_polymorphic_type ( typed , name )
137137 if _association . type
@@ -147,7 +147,7 @@ def bind_polymorphic_type(typed, name)
147147 # @example Bind the polymorphic type.
148148 # binding.bind_polymorphic_inverse_type(post, "Person")
149149 #
150- # @param [ Document ] typed The document that stores the type field.
150+ # @param [ Mongoid:: Document ] typed The document that stores the type field.
151151 # @param [ String ] name The name of the model.
152152 def bind_polymorphic_inverse_type ( typed , name )
153153 if _association . inverse_type
@@ -163,8 +163,8 @@ def bind_polymorphic_inverse_type(typed, name)
163163 # @example Bind the inverse.
164164 # binding.bind_inverse(post, person)
165165 #
166- # @param [ Document ] doc The base document.
167- # @param [ Document ] inverse The inverse document.
166+ # @param [ Mongoid:: Document ] doc The base document.
167+ # @param [ Mongoid:: Document ] inverse The inverse document.
168168 def bind_inverse ( doc , inverse )
169169 if doc . respond_to? ( _association . inverse_setter )
170170 doc . you_must ( _association . inverse_setter , inverse )
@@ -178,7 +178,7 @@ def bind_inverse(doc, inverse)
178178 # @example Bind the document with the base.
179179 # binding.bind_from_relational_parent(doc)
180180 #
181- # @param [ Document ] doc The document to bind.
181+ # @param [ Mongoid:: Document ] doc The document to bind.
182182 def bind_from_relational_parent ( doc )
183183 check_inverse! ( doc )
184184 remove_associated ( doc )
@@ -215,7 +215,7 @@ def set_base_association
215215 # @example Bind the document with the base.
216216 # unbinding.unbind_from_relational_parent(doc)
217217 #
218- # @param [ Document ] doc The document to unbind.
218+ # @param [ Mongoid:: Document ] doc The document to unbind.
219219 def unbind_from_relational_parent ( doc )
220220 check_inverse! ( doc )
221221 bind_foreign_key ( doc , nil )
0 commit comments