Skip to content

Commit c9ba9cf

Browse files
Remove all @SInCE comments. These are generally not useful as: (#5037)
1. They do not reflect significant interface changes to methods 2. They are inconstiently used and we're not adding them on new PRs Co-authored-by: shields <[email protected]>
1 parent c2d28ac commit c9ba9cf

File tree

249 files changed

+0
-3028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+0
-3028
lines changed

lib/mongoid.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ module Mongoid
4242
extend self
4343

4444
# A string added to the platform details of Ruby driver client handshake documents.
45-
#
46-
# @since 6.1.0
4745
PLATFORM_DETAILS = "mongoid-#{VERSION}".freeze
4846

4947
# The minimum MongoDB version supported.
@@ -62,8 +60,6 @@ module Mongoid
6260
# end
6361
#
6462
# @return [ Config ] The configuration object.
65-
#
66-
# @since 1.0.0
6763
def configure
6864
block_given? ? yield(Config) : Config
6965
end
@@ -74,8 +70,6 @@ def configure
7470
# Mongoid.default_client
7571
#
7672
# @return [ Mongo::Client ] The default client.
77-
#
78-
# @since 5.0.0
7973
def default_client
8074
Clients.default
8175
end
@@ -86,8 +80,6 @@ def default_client
8680
# Mongoid.disconnect_clients
8781
#
8882
# @return [ true ] True.
89-
#
90-
# @since 5.0.0
9183
def disconnect_clients
9284
Clients.disconnect
9385
end
@@ -98,8 +90,6 @@ def disconnect_clients
9890
# Mongoid.client(:default)
9991
#
10092
# @return [ Mongo::Client ] The named client.
101-
#
102-
# @since 5.0.0
10393
def client(name)
10494
Clients.with_name(name)
10595
end
@@ -109,8 +99,6 @@ def client(name)
10999
#
110100
# @example Delegate the configuration methods.
111101
# Mongoid.database = Mongo::Connection.new.db("test")
112-
#
113-
# @since 1.0.0
114102
def_delegators Config, *(Config.public_instance_methods(false) - [ :logger=, :logger ])
115103

116104

lib/mongoid/association.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ module Association
3434
# Map the macros to their corresponding Association classes.
3535
#
3636
# @return [ Hash ] The mapping from macros to their Association class.
37-
#
38-
# @since 7.0
3937
MACRO_MAPPING = {
4038
embeds_one: Association::Embedded::EmbedsOne,
4139
embeds_many: Association::Embedded::EmbedsMany,
@@ -60,8 +58,6 @@ module Association
6058
# address.embedded?
6159
#
6260
# @return [ true, false ] True if the document has a parent document.
63-
#
64-
# @since 2.0.0.rc.1
6561
def embedded?
6662
@embedded ||= (cyclic ? _parent.present? : self.class.embedded?)
6763
end
@@ -72,8 +68,6 @@ def embedded?
7268
# address.embedded_many?
7369
#
7470
# @return [ true, false ] True if in an embeds many.
75-
#
76-
# @since 2.0.0.rc.1
7771
def embedded_many?
7872
_association && _association.is_a?(Association::Embedded::EmbedsMany)
7973
end
@@ -84,8 +78,6 @@ def embedded_many?
8478
# address.embedded_one?
8579
#
8680
# @return [ true, false ] True if in an embeds one.
87-
#
88-
# @since 2.0.0.rc.1
8981
def embedded_one?
9082
_association && _association.is_a?(Association::Embedded::EmbedsOne)
9183
end
@@ -99,8 +91,6 @@ def embedded_one?
9991
# @raise [ Errors::NoMetadata ] If no association metadata is present.
10092
#
10193
# @return [ Symbol ] The association name.
102-
#
103-
# @since 3.0.0
10494
def association_name
10595
raise Errors::NoMetadata.new(self.class.name) unless _association
10696
_association.name
@@ -112,8 +102,6 @@ def association_name
112102
# post.referenced_many?
113103
#
114104
# @return [ true, false ] True if in a references many.
115-
#
116-
# @since 2.0.0.rc.1
117105
def referenced_many?
118106
_association && _association.is_a?(Association::Referenced::HasMany)
119107
end
@@ -124,8 +112,6 @@ def referenced_many?
124112
# address.referenced_one?
125113
#
126114
# @return [ true, false ] True if in a references one.
127-
#
128-
# @since 2.0.0.rc.1
129115
def referenced_one?
130116
_association && _association.is_a?(Association::Referenced::HasOne)
131117
end
@@ -137,8 +123,6 @@ def referenced_one?
137123
# document.reload_relations
138124
#
139125
# @return [ Hash ] The association metadata.
140-
#
141-
# @since 2.1.6
142126
def reload_relations
143127
relations.each_pair do |name, meta|
144128
if instance_variable_defined?("@_#{name}")

lib/mongoid/association/accessors.rb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ module Accessors
2424
# accessible in the built document.
2525
#
2626
# @return [ Proxy ] The association.
27-
#
28-
# @since 2.0.0.rc.1
2927
def __build__(name, object, association, selected_fields = nil)
3028
relation = create_relation(object, association, selected_fields)
3129
set_relation(name, relation)
@@ -43,8 +41,6 @@ def __build__(name, object, association, selected_fields = nil)
4341
# accessible in the created association document.
4442
#
4543
# @return [ Proxy ] The association.
46-
#
47-
# @since 2.0.0.rc.1
4844
def create_relation(object, association, selected_fields = nil)
4945
type = @attributes[association.inverse_type]
5046
target = association.build(self, object, type, selected_fields)
@@ -58,8 +54,6 @@ def create_relation(object, association, selected_fields = nil)
5854
# person.reset_relation_criteria(:preferences)
5955
#
6056
# @param [ Symbol ] name The name of the association.
61-
#
62-
# @since 3.0.14
6357
def reset_relation_criteria(name)
6458
if instance_variable_defined?("@_#{name}")
6559
send(name).reset_unloaded
@@ -76,8 +70,6 @@ def reset_relation_criteria(name)
7670
# @param [ Proxy ] relation The association to set.
7771
#
7872
# @return [ Proxy ] The association.
79-
#
80-
# @since 2.0.0.rc.1
8173
def set_relation(name, relation)
8274
instance_variable_set("@_#{name}", relation)
8375
end
@@ -98,8 +90,6 @@ def set_relation(name, relation)
9890
# @param [ true, false ] reload If the association is to be reloaded.
9991
#
10092
# @return [ Proxy ] The association.
101-
#
102-
# @since 3.0.16
10393
def get_relation(name, association, object, reload = false)
10494
if !reload && (value = ivar(name)) != false
10595
value
@@ -209,8 +199,6 @@ def needs_no_database_query?(object, association)
209199
# document.without_autobuild?
210200
#
211201
# @return [ true, false ] If autobuild is disabled.
212-
#
213-
# @since 3.0.0
214202
def without_autobuild?
215203
Threaded.executing?(:without_autobuild)
216204
end
@@ -223,8 +211,6 @@ def without_autobuild?
223211
# end
224212
#
225213
# @return [ Object ] The result of the yield.
226-
#
227-
# @since 3.0.0
228214
def without_autobuild
229215
Threaded.begin_execution("without_autobuild")
230216
yield
@@ -241,8 +227,6 @@ def without_autobuild
241227
# @param [ Array ] args The arguments.
242228
#
243229
# @return [ Array<Hash> ] The attributes and options.
244-
#
245-
# @since 2.3.4
246230
def parse_args(*args)
247231
[args.first || {}, args.size > 1 ? args[1] : {}]
248232
end
@@ -260,8 +244,6 @@ def parse_args(*args)
260244
# @param [ Association ] association The association.
261245
#
262246
# @return [ Class ] The model being set up.
263-
#
264-
# @since 3.0.0
265247
def self.define_existence_check!(association)
266248
name = association.name
267249
association.inverse_class.tap do |klass|
@@ -284,8 +266,6 @@ def #{name}?
284266
# @param [ Association ] association The association metadata for the association.
285267
#
286268
# @return [ Class ] The class being set up.
287-
#
288-
# @since 2.0.0.rc.1
289269
def self.define_getter!(association)
290270
name = association.name
291271
association.inverse_class.tap do |klass|
@@ -328,8 +308,6 @@ def self.define_ids_getter!(association)
328308
# @param [ Association ] association The association metadata for the association.
329309
#
330310
# @return [ Class ] The class being set up.
331-
#
332-
# @since 2.0.0.rc.1
333311
def self.define_setter!(association)
334312
name = association.name
335313
association.inverse_class.tap do |klass|
@@ -380,8 +358,6 @@ def self.define_ids_setter!(association)
380358
# @param [ Association ] association The association for the association.
381359
#
382360
# @return [ Class ] The class being set up.
383-
#
384-
# @since 2.0.0.rc.1
385361
def self.define_builder!(association)
386362
name = association.name
387363
association.inverse_class.tap do |klass|
@@ -407,8 +383,6 @@ def self.define_builder!(association)
407383
# @param [ Association ] association The association for the association.
408384
#
409385
# @return [ Class ] The class being set up.
410-
#
411-
# @since 2.0.0.rc.1
412386
def self.define_creator!(association)
413387
name = association.name
414388
association.inverse_class.tap do |klass|

lib/mongoid/association/bindable.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module Bindable
1818
# @param [ Document ] base The base of the binding.
1919
# @param [ Document, Array<Document> ] target The target of the binding.
2020
# @param [ Association ] association The association metadata.
21-
#
22-
# @since 2.0.0.rc.1
2321
def initialize(base, target, association)
2422
@_base, @_target, @_association = base, target, association
2523
end
@@ -32,8 +30,6 @@ def initialize(base, target, association)
3230
# end
3331
#
3432
# @return [ Object ] The result of the yield.
35-
#
36-
# @since 3.0.0
3733
def binding
3834
unless _binding?
3935
_binding do
@@ -54,8 +50,6 @@ def binding
5450
# @param [ Document ] doc The document getting bound.
5551
#
5652
# @raise [ Errors::InverseNotFound ] If no inverse found.
57-
#
58-
# @since 3.0.0
5953
def check_inverse!(doc)
6054
unless _association.bindable?(doc)
6155
raise Errors::InverseNotFound.new(
@@ -77,8 +71,6 @@ def check_inverse!(doc)
7771
#
7872
# @param [ Document ] keyed The document that stores the foreign key.
7973
# @param [ Object ] id The id of the bound document.
80-
#
81-
# @since 3.0.0
8274
def bind_foreign_key(keyed, id)
8375
unless keyed.frozen?
8476
keyed.you_must(_association.foreign_key_setter, id)
@@ -95,8 +87,6 @@ def bind_foreign_key(keyed, id)
9587
#
9688
# @param [ Document ] typed The document that stores the type field.
9789
# @param [ String ] name The name of the model.
98-
#
99-
# @since 3.0.0
10090
def bind_polymorphic_type(typed, name)
10191
if _association.type
10292
typed.you_must(_association.type_setter, name)
@@ -113,8 +103,6 @@ def bind_polymorphic_type(typed, name)
113103
#
114104
# @param [ Document ] typed The document that stores the type field.
115105
# @param [ String ] name The name of the model.
116-
#
117-
# @since 3.0.0
118106
def bind_polymorphic_inverse_type(typed, name)
119107
if _association.inverse_type
120108
typed.you_must(_association.inverse_type_setter, name)
@@ -131,8 +119,6 @@ def bind_polymorphic_inverse_type(typed, name)
131119
#
132120
# @param [ Document ] doc The base document.
133121
# @param [ Document ] inverse The inverse document.
134-
#
135-
# @since 3.0.0
136122
def bind_inverse(doc, inverse)
137123
if doc.respond_to?(_association.inverse_setter)
138124
doc.you_must(_association.inverse_setter, inverse)
@@ -147,8 +133,6 @@ def bind_inverse(doc, inverse)
147133
# binding.bind_from_relational_parent(doc)
148134
#
149135
# @param [ Document ] doc The document to bind.
150-
#
151-
# @since 3.0.0
152136
def bind_from_relational_parent(doc)
153137
check_inverse!(doc)
154138
bind_foreign_key(doc, record_id(_base))
@@ -170,8 +154,6 @@ def record_id(_base)
170154
# binding.set_base_association
171155
#
172156
# @return [ true, false ] If the association changed.
173-
#
174-
# @since 2.4.4
175157
def set_base_association
176158
inverse_association = _association.inverse_association(_target)
177159
if inverse_association != _association && !inverse_association.nil?
@@ -187,8 +169,6 @@ def set_base_association
187169
# unbinding.unbind_from_relational_parent(doc)
188170
#
189171
# @param [ Document ] doc The document to unbind.
190-
#
191-
# @since 3.0.0
192172
def unbind_from_relational_parent(doc)
193173
check_inverse!(doc)
194174
bind_foreign_key(doc, nil)

lib/mongoid/association/builders.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ module Association
1717
# # The following methods get created:
1818
# person.build_name({ :first_name => "Durran" })
1919
# person.create_name({ :first_name => "Durran" })
20-
#
21-
# @since 2.0.0.rc.1
2220
module Builders
2321
extend ActiveSupport::Concern
2422

@@ -33,8 +31,6 @@ module Builders
3331
# @param [ Array ] args The arguments.
3432
#
3533
# @return [ Array<Hash> ] The attributes and options.
36-
#
37-
# @since 2.3.4
3834
def parse_args(*args)
3935
[ args.first || {}, args.size > 1 ? args[1] : {} ]
4036
end
@@ -47,8 +43,6 @@ def parse_args(*args)
4743
# @param [ Association ] association The association metadata for the association.
4844
#
4945
# @return [ Class ] The class being set up.
50-
#
51-
# @since 2.0.0.rc.1
5246
def self.define_builder!(association)
5347
association.inverse_class.tap do |klass|
5448
klass.re_define_method("build_#{association.name}") do |*args|
@@ -72,8 +66,6 @@ def self.define_builder!(association)
7266
# @param [ Association ] association The association metadata for the association.
7367
#
7468
# @return [ Class ] The class being set up.
75-
#
76-
# @since 2.0.0.rc.1
7769
def self.define_creator!(association)
7870
association.inverse_class.tap do |klass|
7971
klass.re_define_method("create_#{association.name}") do |*args|

lib/mongoid/association/constrainable.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module Constrainable
1818
# @param [ Object ] object The object to convert.
1919
#
2020
# @return [ Object ] The object cast to the correct type.
21-
#
22-
# @since 2.0.0.rc.7
2321
def convert_to_foreign_key(object)
2422
return convert_polymorphic(object) if polymorphic?
2523
field = relation_class.fields["_id"]

0 commit comments

Comments
 (0)