sofia 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.byebug_history +6 -0
  3. data/.rubocop.yml +179 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +5 -0
  6. data/CODE_OF_CONDUCT.md +132 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +21 -0
  9. data/Rakefile +16 -0
  10. data/lib/sofia/adapter/net_http.rb +67 -0
  11. data/lib/sofia/adapter.rb +20 -0
  12. data/lib/sofia/client.rb +55 -0
  13. data/lib/sofia/error/argument_error.rb +8 -0
  14. data/lib/sofia/error/connection_failed.rb +8 -0
  15. data/lib/sofia/error/invalid_json.rb +8 -0
  16. data/lib/sofia/error/ssl_error.rb +8 -0
  17. data/lib/sofia/error/timeout_error.rb +8 -0
  18. data/lib/sofia/error.rb +14 -0
  19. data/lib/sofia/helper.rb +9 -0
  20. data/lib/sofia/request.rb +56 -0
  21. data/lib/sofia/response.rb +57 -0
  22. data/lib/sofia/sorbet_types.rb +19 -0
  23. data/lib/sofia/types/adapter.rb +39 -0
  24. data/lib/sofia/types/base_url.rb +33 -0
  25. data/lib/sofia/types/body.rb +60 -0
  26. data/lib/sofia/types/headers.rb +56 -0
  27. data/lib/sofia/types/params.rb +56 -0
  28. data/lib/sofia/types/path.rb +28 -0
  29. data/lib/sofia/types.rb +13 -0
  30. data/lib/sofia/version.rb +5 -0
  31. data/lib/sofia.rb +25 -0
  32. data/sig/sofia.rbs +4 -0
  33. data/sorbet/config +6 -0
  34. data/sorbet/rbi/annotations/.gitattributes +1 -0
  35. data/sorbet/rbi/annotations/activesupport.rbi +495 -0
  36. data/sorbet/rbi/annotations/minitest.rbi +120 -0
  37. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  38. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  39. data/sorbet/rbi/dsl/.gitattributes +1 -0
  40. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  41. data/sorbet/rbi/gems/.gitattributes +1 -0
  42. data/sorbet/rbi/gems/activesupport@8.1.2.rbi +20360 -0
  43. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  44. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  45. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  46. data/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +239 -0
  47. data/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi +11674 -0
  48. data/sorbet/rbi/gems/connection_pool@3.0.2.rbi +9 -0
  49. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  50. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  51. data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
  52. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  53. data/sorbet/rbi/gems/factory_bot@6.5.6.rbi +2748 -0
  54. data/sorbet/rbi/gems/i18n@1.14.8.rbi +2359 -0
  55. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  56. data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
  57. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  58. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +86 -0
  59. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  60. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
  61. data/sorbet/rbi/gems/mocha@3.0.1.rbi +28 -0
  62. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  63. data/sorbet/rbi/gems/openssl@4.0.0.rbi +1908 -0
  64. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  65. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
  66. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  67. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  68. data/sorbet/rbi/gems/prism@1.5.1.rbi +42049 -0
  69. data/sorbet/rbi/gems/psych@5.2.6.rbi +2469 -0
  70. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  71. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  72. data/sorbet/rbi/gems/rake@13.2.1.rbi +3033 -0
  73. data/sorbet/rbi/gems/rbi@0.3.3.rbi +6742 -0
  74. data/sorbet/rbi/gems/rbs@3.9.5.rbi +6978 -0
  75. data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12688 -0
  76. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3795 -0
  77. data/sorbet/rbi/gems/reline@0.6.2.rbi +2441 -0
  78. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5240 -0
  79. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +7721 -0
  80. data/sorbet/rbi/gems/rubocop@1.76.1.rbi +62517 -0
  81. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  82. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  83. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  84. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  85. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  86. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  87. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  88. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  89. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  90. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  91. data/sorbet/rbi/gems/uri@1.1.1.rbi +2405 -0
  92. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  93. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  94. data/sorbet/rbi/shims/byebug.rbi +6 -0
  95. data/sorbet/rbi/shims/client.rbi +22 -0
  96. data/sorbet/rbi/todo.rbi +7 -0
  97. data/sorbet/tapioca/config.yml +13 -0
  98. data/sorbet/tapioca/require.rb +4 -0
  99. metadata +137 -0
@@ -0,0 +1,2748 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `factory_bot` gem.
5
+ # Please instead update this file by running `bin/tapioca gem factory_bot`.
6
+
7
+
8
+ # source://factory_bot//lib/factory_bot/internal.rb#1
9
+ module FactoryBot
10
+ extend ::FactoryBot::Syntax::Methods
11
+ extend ::FactoryBot::Syntax::Default
12
+
13
+ class << self
14
+ # Returns the value of attribute aliases.
15
+ #
16
+ # source://factory_bot//lib/factory_bot/aliases.rb#3
17
+ def aliases; end
18
+
19
+ # Sets the attribute aliases
20
+ #
21
+ # @param value the value to set the attribute aliases to.
22
+ #
23
+ # source://factory_bot//lib/factory_bot/aliases.rb#3
24
+ def aliases=(_arg0); end
25
+
26
+ # source://factory_bot//lib/factory_bot/aliases.rb#11
27
+ def aliases_for(attribute); end
28
+
29
+ # source://factory_bot//lib/factory_bot.rb#54
30
+ def automatically_define_enum_traits; end
31
+
32
+ # source://factory_bot//lib/factory_bot.rb#54
33
+ def automatically_define_enum_traits=(val); end
34
+
35
+ # Set the starting value for ids when using the build_stubbed strategy
36
+ #
37
+ # @param starting_id [Integer] The new starting id value.
38
+ #
39
+ # source://factory_bot//lib/factory_bot.rb#76
40
+ def build_stubbed_starting_id=(starting_id); end
41
+
42
+ # An Array of strings specifying locations that should be searched for
43
+ # factory definitions. By default, factory_bot will attempt to require
44
+ # "factories.rb", "factories/**/*.rb", "test/factories.rb",
45
+ # "test/factories/**.rb", "spec/factories.rb", and "spec/factories/**.rb".
46
+ #
47
+ # source://factory_bot//lib/factory_bot/find_definitions.rb#7
48
+ def definition_file_paths; end
49
+
50
+ # An Array of strings specifying locations that should be searched for
51
+ # factory definitions. By default, factory_bot will attempt to require
52
+ # "factories.rb", "factories/**/*.rb", "test/factories.rb",
53
+ # "test/factories/**.rb", "spec/factories.rb", and "spec/factories/**.rb".
54
+ #
55
+ # source://factory_bot//lib/factory_bot/find_definitions.rb#7
56
+ def definition_file_paths=(_arg0); end
57
+
58
+ # source://factory_bot//lib/factory_bot.rb#107
59
+ def factories(*_arg0, **_arg1, &_arg2); end
60
+
61
+ # source://factory_bot//lib/factory_bot/find_definitions.rb#12
62
+ def find_definitions; end
63
+
64
+ # Look for errors in factories and (optionally) their traits.
65
+ # Parameters:
66
+ # factories - which factories to lint; omit for all factories
67
+ # options:
68
+ # traits: true - to lint traits as well as factories
69
+ # strategy: :create - to specify the strategy for linting
70
+ # verbose: true - to include full backtraces for each linting error
71
+ #
72
+ # source://factory_bot//lib/factory_bot.rb#67
73
+ def lint(*args); end
74
+
75
+ # source://factory_bot//lib/factory_bot.rb#107
76
+ def register_strategy(strategy_name, strategy_class, &_arg2); end
77
+
78
+ # source://factory_bot//lib/factory_bot/reload.rb#2
79
+ def reload; end
80
+
81
+ # Rewind an individual global or inline sequence.
82
+ #
83
+ # @example Rewinding a sequence by its URI parts
84
+ # rewind_sequence(:factory_name, :trait_name, :sequence_name)
85
+ # @example Rewinding a sequence by its URI string
86
+ # rewind_sequence("factory_name/trait_name/sequence_name")
87
+ # @param uri_parts [Array<Symbol>, String] The components of the sequence URI.
88
+ #
89
+ # source://factory_bot//lib/factory_bot.rb#107
90
+ def rewind_sequence(*_arg0, **_arg1, &_arg2); end
91
+
92
+ # source://factory_bot//lib/factory_bot.rb#107
93
+ def rewind_sequences(&_arg0); end
94
+
95
+ # source://factory_bot//lib/factory_bot.rb#57
96
+ def sequence_setting_timeout; end
97
+
98
+ # source://factory_bot//lib/factory_bot.rb#57
99
+ def sequence_setting_timeout=(val); end
100
+
101
+ # Set the sequence to a specific value, providing the new value is within
102
+ # the sequence set.
103
+ #
104
+ # @example
105
+ # set_sequence(:factory_name, :trait_name, :sequence_name, 450)
106
+ # @example
107
+ # set_sequence([:factory_name, :trait_name, :sequence_name], 450)
108
+ # @example
109
+ # set_sequence("factory_name/trait_name/sequence_name", 450)
110
+ # @param uri_parts [Array<Symbol>, String] The components of the sequence URI.
111
+ # @param value [Object] The new value for the sequence. This must be a value that is
112
+ # within the sequence definition. For example, you cannot set
113
+ # a String sequence to an Integer value.
114
+ #
115
+ # source://factory_bot//lib/factory_bot.rb#107
116
+ def set_sequence(*_arg0, **_arg1, &_arg2); end
117
+
118
+ # source://factory_bot//lib/factory_bot.rb#107
119
+ def strategy_by_name(name, &_arg1); end
120
+
121
+ # source://factory_bot//lib/factory_bot.rb#51
122
+ def use_parent_strategy; end
123
+
124
+ # source://factory_bot//lib/factory_bot.rb#51
125
+ def use_parent_strategy=(val); end
126
+ end
127
+ end
128
+
129
+ # Raised when attempting to pass a block to an association definition
130
+ #
131
+ # source://factory_bot//lib/factory_bot/errors.rb#3
132
+ class FactoryBot::AssociationDefinitionError < ::RuntimeError; end
133
+
134
+ # @api private
135
+ #
136
+ # source://factory_bot//lib/factory_bot/attribute/dynamic.rb#2
137
+ class FactoryBot::Attribute
138
+ # @api private
139
+ # @return [Attribute] a new instance of Attribute
140
+ #
141
+ # source://factory_bot//lib/factory_bot/attribute.rb#10
142
+ def initialize(name, ignored); end
143
+
144
+ # @api private
145
+ # @return [Boolean]
146
+ #
147
+ # source://factory_bot//lib/factory_bot/attribute.rb#23
148
+ def alias_for?(attr); end
149
+
150
+ # @api private
151
+ # @return [Boolean]
152
+ #
153
+ # source://factory_bot//lib/factory_bot/attribute.rb#19
154
+ def association?; end
155
+
156
+ # @api private
157
+ #
158
+ # source://factory_bot//lib/factory_bot/attribute.rb#8
159
+ def ignored; end
160
+
161
+ # @api private
162
+ #
163
+ # source://factory_bot//lib/factory_bot/attribute.rb#8
164
+ def name; end
165
+
166
+ # @api private
167
+ #
168
+ # source://factory_bot//lib/factory_bot/attribute.rb#15
169
+ def to_proc; end
170
+ end
171
+
172
+ # @api private
173
+ #
174
+ # source://factory_bot//lib/factory_bot/attribute/association.rb#4
175
+ class FactoryBot::Attribute::Association < ::FactoryBot::Attribute
176
+ # @api private
177
+ # @return [Association] a new instance of Association
178
+ #
179
+ # source://factory_bot//lib/factory_bot/attribute/association.rb#7
180
+ def initialize(name, factory, overrides); end
181
+
182
+ # @api private
183
+ # @return [Boolean]
184
+ #
185
+ # source://factory_bot//lib/factory_bot/attribute/association.rb#22
186
+ def association?; end
187
+
188
+ # @api private
189
+ #
190
+ # source://factory_bot//lib/factory_bot/attribute/association.rb#5
191
+ def factory; end
192
+
193
+ # @api private
194
+ #
195
+ # source://factory_bot//lib/factory_bot/attribute/association.rb#13
196
+ def to_proc; end
197
+ end
198
+
199
+ # @api private
200
+ #
201
+ # source://factory_bot//lib/factory_bot/attribute/dynamic.rb#4
202
+ class FactoryBot::Attribute::Dynamic < ::FactoryBot::Attribute
203
+ # @api private
204
+ # @return [Dynamic] a new instance of Dynamic
205
+ #
206
+ # source://factory_bot//lib/factory_bot/attribute/dynamic.rb#5
207
+ def initialize(name, ignored, block); end
208
+
209
+ # @api private
210
+ #
211
+ # source://factory_bot//lib/factory_bot/attribute/dynamic.rb#10
212
+ def to_proc; end
213
+ end
214
+
215
+ # @api private
216
+ #
217
+ # source://factory_bot//lib/factory_bot/attribute/sequence.rb#4
218
+ class FactoryBot::Attribute::Sequence < ::FactoryBot::Attribute
219
+ # @api private
220
+ # @return [Sequence] a new instance of Sequence
221
+ #
222
+ # source://factory_bot//lib/factory_bot/attribute/sequence.rb#5
223
+ def initialize(name, sequence, ignored); end
224
+
225
+ # @api private
226
+ #
227
+ # source://factory_bot//lib/factory_bot/attribute/sequence.rb#10
228
+ def to_proc; end
229
+ end
230
+
231
+ # @api private
232
+ #
233
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#3
234
+ class FactoryBot::AttributeAssigner
235
+ # @api private
236
+ # @return [AttributeAssigner] a new instance of AttributeAssigner
237
+ #
238
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#4
239
+ def initialize(evaluator, build_class, &instance_builder); end
240
+
241
+ # constructs a Hash-based factory product
242
+ #
243
+ # @api private
244
+ #
245
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#24
246
+ def hash; end
247
+
248
+ # constructs an object-based factory product
249
+ #
250
+ # @api private
251
+ #
252
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#13
253
+ def object; end
254
+
255
+ private
256
+
257
+ # @api private
258
+ #
259
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#93
260
+ def association_names; end
261
+
262
+ # @api private
263
+ #
264
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#101
265
+ def attribute_names; end
266
+
267
+ # Builds a list of attribute names which are slated to be interrupted by an override.
268
+ #
269
+ # @api private
270
+ #
271
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#110
272
+ def attribute_names_overriden_by_alias; end
273
+
274
+ # Builds a list of attributes names that should be assigned to the factory product
275
+ #
276
+ # @api private
277
+ #
278
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#75
279
+ def attribute_names_to_assign; end
280
+
281
+ # @api private
282
+ #
283
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#70
284
+ def attributes_to_set_on_hash; end
285
+
286
+ # @api private
287
+ #
288
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#66
289
+ def attributes_to_set_on_instance; end
290
+
291
+ # @api private
292
+ #
293
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#54
294
+ def build_class_instance; end
295
+
296
+ # @api private
297
+ #
298
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#58
299
+ def build_hash; end
300
+
301
+ # @api private
302
+ #
303
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#43
304
+ def decorated_evaluator; end
305
+
306
+ # @api private
307
+ #
308
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#62
309
+ def get(attribute_name); end
310
+
311
+ # @api private
312
+ #
313
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#105
314
+ def hash_instance_methods_to_respond_to; end
315
+
316
+ # Is the attribute an ignorable alias of the override?
317
+ # An attribute is ignorable when it is an alias of the override AND it is
318
+ # either interrupting an assocciation OR is not the name of another attribute
319
+ #
320
+ # @api private
321
+ # @note An "alias" is currently an overloaded term for two distinct cases:
322
+ # (1) attributes which are aliases and reference the same value
323
+ # (2) a logical grouping of a foreign key and an associated object
324
+ # @return [Boolean]
325
+ #
326
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#128
327
+ def ignorable_alias?(attribute, override); end
328
+
329
+ # @api private
330
+ #
331
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#89
332
+ def ignored_attribute_names; end
333
+
334
+ # Track evaluation of methods on the evaluator to prevent the duplicate
335
+ # assignment of attributes accessed and via `initialize_with` syntax
336
+ #
337
+ # @api private
338
+ #
339
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#36
340
+ def method_tracking_evaluator; end
341
+
342
+ # @api private
343
+ #
344
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#50
345
+ def methods_invoked_on_evaluator; end
346
+
347
+ # @api private
348
+ #
349
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#85
350
+ def non_ignored_attribute_names; end
351
+
352
+ # Does this override interrupt an association?
353
+ # When true, this indicates the aliased attribute is related to a declared association and the
354
+ # override does not match the attribute name.
355
+ #
356
+ # @api private
357
+ # @note Association overrides should take precedence over a declared foreign key attribute.
358
+ # @note An override may interrupt an association by providing the associated object or
359
+ # by providing the foreign key.
360
+ # @param aliased_attribute [FactoryBot::Attribute]
361
+ # @param override [Symbol] name of an override which is an alias to the attribute name
362
+ # @return [Boolean]
363
+ #
364
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#152
365
+ def override_interrupts_association?(aliased_attribute, override); end
366
+
367
+ # Does this override match the name of any declared attribute?
368
+ #
369
+ # @api private
370
+ # @note Checking against the names of all attributes, resolves any issues with having both
371
+ # <attribute> and <attribute>_id in the same factory. This also takes into account ignored
372
+ # attributes that should not be assigned (aka transient attributes)
373
+ # @param override [Symbol] the name of an override
374
+ # @return [Boolean]
375
+ #
376
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#164
377
+ def override_matches_declared_attribute?(override); end
378
+
379
+ # @api private
380
+ #
381
+ # source://factory_bot//lib/factory_bot/attribute_assigner.rb#97
382
+ def override_names; end
383
+ end
384
+
385
+ # Raised when defining an attribute twice in the same factory
386
+ #
387
+ # source://factory_bot//lib/factory_bot/errors.rb#18
388
+ class FactoryBot::AttributeDefinitionError < ::RuntimeError; end
389
+
390
+ # @api private
391
+ #
392
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#3
393
+ class FactoryBot::AttributeList
394
+ include ::Enumerable
395
+
396
+ # @api private
397
+ # @return [AttributeList] a new instance of AttributeList
398
+ #
399
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#6
400
+ def initialize(name = T.unsafe(nil), attributes = T.unsafe(nil)); end
401
+
402
+ # @api private
403
+ #
404
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#38
405
+ def apply_attributes(attributes_to_apply); end
406
+
407
+ # @api private
408
+ #
409
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#26
410
+ def associations; end
411
+
412
+ # @api private
413
+ #
414
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#11
415
+ def define_attribute(attribute); end
416
+
417
+ # @api private
418
+ #
419
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#18
420
+ def each(&block); end
421
+
422
+ # @api private
423
+ #
424
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#30
425
+ def ignored; end
426
+
427
+ # @api private
428
+ #
429
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#22
430
+ def names; end
431
+
432
+ # @api private
433
+ #
434
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#34
435
+ def non_ignored; end
436
+
437
+ private
438
+
439
+ # @api private
440
+ #
441
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#44
442
+ def add_attribute(attribute); end
443
+
444
+ # @api private
445
+ # @return [Boolean]
446
+ #
447
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#62
448
+ def attribute_defined?(attribute_name); end
449
+
450
+ # @api private
451
+ #
452
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#49
453
+ def ensure_attribute_not_defined!(attribute); end
454
+
455
+ # @api private
456
+ #
457
+ # source://factory_bot//lib/factory_bot/attribute_list.rb#55
458
+ def ensure_attribute_not_self_referencing!(attribute); end
459
+ end
460
+
461
+ # source://factory_bot//lib/factory_bot/callback.rb#2
462
+ class FactoryBot::Callback
463
+ # @return [Callback] a new instance of Callback
464
+ #
465
+ # source://factory_bot//lib/factory_bot/callback.rb#5
466
+ def initialize(name, block); end
467
+
468
+ # source://factory_bot//lib/factory_bot/callback.rb#18
469
+ def ==(other); end
470
+
471
+ # Returns the value of attribute name.
472
+ #
473
+ # source://factory_bot//lib/factory_bot/callback.rb#3
474
+ def name; end
475
+
476
+ # source://factory_bot//lib/factory_bot/callback.rb#10
477
+ def run(instance, evaluator); end
478
+
479
+ protected
480
+
481
+ # Returns the value of attribute block.
482
+ #
483
+ # source://factory_bot//lib/factory_bot/callback.rb#25
484
+ def block; end
485
+
486
+ private
487
+
488
+ # source://factory_bot//lib/factory_bot/callback.rb#29
489
+ def syntax_runner; end
490
+ end
491
+
492
+ # @api private
493
+ #
494
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#3
495
+ class FactoryBot::CallbacksObserver
496
+ # @api private
497
+ # @return [CallbacksObserver] a new instance of CallbacksObserver
498
+ #
499
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#4
500
+ def initialize(callbacks, evaluator); end
501
+
502
+ # @api private
503
+ #
504
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#10
505
+ def update(name, result_instance); end
506
+
507
+ private
508
+
509
+ # @api private
510
+ #
511
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#21
512
+ def callbacks_by_name(name); end
513
+
514
+ # @api private
515
+ # @return [Boolean]
516
+ #
517
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#25
518
+ def completed?(instance, callback); end
519
+
520
+ # @api private
521
+ #
522
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#35
523
+ def completion_key_for(instance, callback); end
524
+
525
+ # @api private
526
+ #
527
+ # source://factory_bot//lib/factory_bot/callbacks_observer.rb#30
528
+ def record_completion!(instance, callback); end
529
+ end
530
+
531
+ # @api private
532
+ #
533
+ # source://factory_bot//lib/factory_bot/configuration.rb#3
534
+ class FactoryBot::Configuration
535
+ # @api private
536
+ # @return [Configuration] a new instance of Configuration
537
+ #
538
+ # source://factory_bot//lib/factory_bot/configuration.rb#13
539
+ def initialize; end
540
+
541
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
542
+ def after(*_arg0, **_arg1, &_arg2); end
543
+
544
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
545
+ def before(*_arg0, **_arg1, &_arg2); end
546
+
547
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
548
+ def callback(*_arg0, **_arg1, &_arg2); end
549
+
550
+ # @api private
551
+ #
552
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
553
+ def callback_names; end
554
+
555
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
556
+ def callbacks(*_arg0, **_arg1, &_arg2); end
557
+
558
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
559
+ def constructor(*_arg0, **_arg1, &_arg2); end
560
+
561
+ # @api private
562
+ #
563
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
564
+ def factories; end
565
+
566
+ # @api private
567
+ #
568
+ # source://factory_bot//lib/factory_bot/configuration.rb#29
569
+ def initialize_with(&block); end
570
+
571
+ # @api private
572
+ #
573
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
574
+ def inline_sequences; end
575
+
576
+ # @api private
577
+ #
578
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
579
+ def sequences; end
580
+
581
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
582
+ def skip_create(*_arg0, **_arg1, &_arg2); end
583
+
584
+ # @api private
585
+ #
586
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
587
+ def strategies; end
588
+
589
+ # source://factory_bot//lib/factory_bot/configuration.rb#26
590
+ def to_create(*_arg0, **_arg1, &_arg2); end
591
+
592
+ # @api private
593
+ #
594
+ # source://factory_bot//lib/factory_bot/configuration.rb#4
595
+ def traits; end
596
+ end
597
+
598
+ # @api private
599
+ #
600
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#2
601
+ class FactoryBot::Declaration
602
+ # @api private
603
+ # @return [Declaration] a new instance of Declaration
604
+ #
605
+ # source://factory_bot//lib/factory_bot/declaration.rb#10
606
+ def initialize(name, ignored = T.unsafe(nil)); end
607
+
608
+ # @api private
609
+ #
610
+ # source://factory_bot//lib/factory_bot/declaration.rb#8
611
+ def name; end
612
+
613
+ # @api private
614
+ #
615
+ # source://factory_bot//lib/factory_bot/declaration.rb#15
616
+ def to_attributes; end
617
+
618
+ protected
619
+
620
+ # @api private
621
+ #
622
+ # source://factory_bot//lib/factory_bot/declaration.rb#21
623
+ def ignored; end
624
+ end
625
+
626
+ # @api private
627
+ #
628
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#4
629
+ class FactoryBot::Declaration::Association < ::FactoryBot::Declaration
630
+ # @api private
631
+ # @return [Association] a new instance of Association
632
+ #
633
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#5
634
+ def initialize(name, *options); end
635
+
636
+ # @api private
637
+ #
638
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#13
639
+ def ==(other); end
640
+
641
+ protected
642
+
643
+ # @api private
644
+ #
645
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#21
646
+ def options; end
647
+
648
+ private
649
+
650
+ # @api private
651
+ #
652
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#27
653
+ def build; end
654
+
655
+ # @api private
656
+ #
657
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#25
658
+ def factory_name; end
659
+
660
+ # @api private
661
+ #
662
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#25
663
+ def overrides; end
664
+
665
+ # @api private
666
+ #
667
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#39
668
+ def raise_if_arguments_are_declarations!; end
669
+
670
+ # @api private
671
+ #
672
+ # source://factory_bot//lib/factory_bot/declaration/association.rb#25
673
+ def traits; end
674
+ end
675
+
676
+ # @api private
677
+ #
678
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#4
679
+ class FactoryBot::Declaration::Dynamic < ::FactoryBot::Declaration
680
+ # @api private
681
+ # @return [Dynamic] a new instance of Dynamic
682
+ #
683
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#5
684
+ def initialize(name, ignored = T.unsafe(nil), block = T.unsafe(nil)); end
685
+
686
+ # @api private
687
+ #
688
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#10
689
+ def ==(other); end
690
+
691
+ protected
692
+
693
+ # @api private
694
+ #
695
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#19
696
+ def block; end
697
+
698
+ private
699
+
700
+ # @api private
701
+ #
702
+ # source://factory_bot//lib/factory_bot/declaration/dynamic.rb#23
703
+ def build; end
704
+ end
705
+
706
+ # @api private
707
+ #
708
+ # source://factory_bot//lib/factory_bot/declaration/implicit.rb#4
709
+ class FactoryBot::Declaration::Implicit < ::FactoryBot::Declaration
710
+ # @api private
711
+ # @return [Implicit] a new instance of Implicit
712
+ #
713
+ # source://factory_bot//lib/factory_bot/declaration/implicit.rb#5
714
+ def initialize(name, factory = T.unsafe(nil), ignored = T.unsafe(nil)); end
715
+
716
+ # @api private
717
+ #
718
+ # source://factory_bot//lib/factory_bot/declaration/implicit.rb#10
719
+ def ==(other); end
720
+
721
+ protected
722
+
723
+ # @api private
724
+ #
725
+ # source://factory_bot//lib/factory_bot/declaration/implicit.rb#19
726
+ def factory; end
727
+
728
+ private
729
+
730
+ # @api private
731
+ #
732
+ # source://factory_bot//lib/factory_bot/declaration/implicit.rb#23
733
+ def build; end
734
+ end
735
+
736
+ # @api private
737
+ #
738
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#3
739
+ class FactoryBot::DeclarationList
740
+ include ::Enumerable
741
+
742
+ # @api private
743
+ # @return [DeclarationList] a new instance of DeclarationList
744
+ #
745
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#6
746
+ def initialize(name = T.unsafe(nil)); end
747
+
748
+ # @api private
749
+ #
750
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#23
751
+ def attributes; end
752
+
753
+ # @api private
754
+ #
755
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#12
756
+ def declare_attribute(declaration); end
757
+
758
+ # @api private
759
+ #
760
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#31
761
+ def each(&block); end
762
+
763
+ # @api private
764
+ #
765
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#19
766
+ def overridable; end
767
+
768
+ private
769
+
770
+ # @api private
771
+ #
772
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#37
773
+ def delete_declaration(declaration); end
774
+
775
+ # @api private
776
+ # @return [Boolean]
777
+ #
778
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#45
779
+ def overridable?; end
780
+
781
+ # @api private
782
+ #
783
+ # source://factory_bot//lib/factory_bot/declaration_list.rb#41
784
+ def to_attributes; end
785
+ end
786
+
787
+ # source://factory_bot//lib/factory_bot/decorator.rb#2
788
+ class FactoryBot::Decorator < ::BasicObject
789
+ # @return [Decorator] a new instance of Decorator
790
+ #
791
+ # source://factory_bot//lib/factory_bot/decorator.rb#5
792
+ def initialize(component); end
793
+
794
+ # source://factory_bot//lib/factory_bot/decorator.rb#9
795
+ def method_missing(*_arg0, **_arg1, &_arg2); end
796
+
797
+ # source://factory_bot//lib/factory_bot/decorator.rb#13
798
+ def send(*_arg0, **_arg1, &_arg2); end
799
+
800
+ private
801
+
802
+ # @return [Boolean]
803
+ #
804
+ # source://factory_bot//lib/factory_bot/decorator.rb#17
805
+ def respond_to_missing?(name, include_private = T.unsafe(nil)); end
806
+
807
+ class << self
808
+ # source://factory_bot//lib/factory_bot/decorator.rb#21
809
+ def const_missing(name); end
810
+ end
811
+ end
812
+
813
+ # source://factory_bot//lib/factory_bot/decorator/attribute_hash.rb#3
814
+ class FactoryBot::Decorator::AttributeHash < ::FactoryBot::Decorator
815
+ # @return [AttributeHash] a new instance of AttributeHash
816
+ #
817
+ # source://factory_bot//lib/factory_bot/decorator/attribute_hash.rb#4
818
+ def initialize(component, attributes = T.unsafe(nil)); end
819
+
820
+ # source://factory_bot//lib/factory_bot/decorator/attribute_hash.rb#9
821
+ def attributes; end
822
+ end
823
+
824
+ # source://factory_bot//lib/factory_bot/decorator/disallows_duplicates_registry.rb#3
825
+ class FactoryBot::Decorator::DisallowsDuplicatesRegistry < ::FactoryBot::Decorator
826
+ # source://factory_bot//lib/factory_bot/decorator/disallows_duplicates_registry.rb#4
827
+ def register(name, item); end
828
+ end
829
+
830
+ # source://factory_bot//lib/factory_bot/decorator/invocation_tracker.rb#3
831
+ class FactoryBot::Decorator::InvocationTracker < ::FactoryBot::Decorator
832
+ # @return [InvocationTracker] a new instance of InvocationTracker
833
+ #
834
+ # source://factory_bot//lib/factory_bot/decorator/invocation_tracker.rb#4
835
+ def initialize(component); end
836
+
837
+ # source://factory_bot//lib/factory_bot/decorator/invocation_tracker.rb#15
838
+ def __invoked_methods__; end
839
+
840
+ # source://factory_bot//lib/factory_bot/decorator/invocation_tracker.rb#9
841
+ def method_missing(name, *args, **_arg2, &block); end
842
+ end
843
+
844
+ # source://factory_bot//lib/factory_bot/decorator/new_constructor.rb#3
845
+ class FactoryBot::Decorator::NewConstructor < ::FactoryBot::Decorator
846
+ # @return [NewConstructor] a new instance of NewConstructor
847
+ #
848
+ # source://factory_bot//lib/factory_bot/decorator/new_constructor.rb#4
849
+ def initialize(component, build_class); end
850
+
851
+ # source://factory_bot//lib/factory_bot/decorator/new_constructor.rb#9
852
+ def new(*_arg0, **_arg1, &_arg2); end
853
+ end
854
+
855
+ # @api private
856
+ #
857
+ # source://factory_bot//lib/factory_bot/definition.rb#3
858
+ class FactoryBot::Definition
859
+ # @api private
860
+ # @return [Definition] a new instance of Definition
861
+ #
862
+ # source://factory_bot//lib/factory_bot/definition.rb#7
863
+ def initialize(name, base_traits = T.unsafe(nil), **opts); end
864
+
865
+ # @api private
866
+ #
867
+ # source://factory_bot//lib/factory_bot/definition.rb#87
868
+ def add_callback(callback); end
869
+
870
+ # @api private
871
+ #
872
+ # source://factory_bot//lib/factory_bot/definition.rb#115
873
+ def after(*names, &block); end
874
+
875
+ # @api private
876
+ #
877
+ # source://factory_bot//lib/factory_bot/definition.rb#83
878
+ def append_traits(new_traits); end
879
+
880
+ # @api private
881
+ #
882
+ # source://factory_bot//lib/factory_bot/definition.rb#25
883
+ def attributes; end
884
+
885
+ # @api private
886
+ #
887
+ # source://factory_bot//lib/factory_bot/definition.rb#111
888
+ def before(*names, &block); end
889
+
890
+ # @api private
891
+ #
892
+ # source://factory_bot//lib/factory_bot/definition.rb#119
893
+ def callback(*names, &block); end
894
+
895
+ # @api private
896
+ #
897
+ # source://factory_bot//lib/factory_bot/definition.rb#46
898
+ def callbacks; end
899
+
900
+ # @api private
901
+ #
902
+ # source://factory_bot//lib/factory_bot/definition.rb#50
903
+ def compile(klass = T.unsafe(nil)); end
904
+
905
+ # @api private
906
+ #
907
+ # source://factory_bot//lib/factory_bot/definition.rb#42
908
+ def constructor; end
909
+
910
+ # @api private
911
+ #
912
+ # source://factory_bot//lib/factory_bot/definition.rb#4
913
+ def declarations; end
914
+
915
+ # source://factory_bot//lib/factory_bot/definition.rb#23
916
+ def declare_attribute(*_arg0, **_arg1, &_arg2); end
917
+
918
+ # @api private
919
+ #
920
+ # source://factory_bot//lib/factory_bot/definition.rb#107
921
+ def define_constructor(&block); end
922
+
923
+ # @api private
924
+ #
925
+ # source://factory_bot//lib/factory_bot/definition.rb#95
926
+ def define_trait(trait); end
927
+
928
+ # @api private
929
+ #
930
+ # source://factory_bot//lib/factory_bot/definition.rb#4
931
+ def defined_traits; end
932
+
933
+ # @api private
934
+ #
935
+ # source://factory_bot//lib/factory_bot/definition.rb#99
936
+ def defined_traits_names; end
937
+
938
+ # @api private
939
+ #
940
+ # source://factory_bot//lib/factory_bot/definition.rb#79
941
+ def inherit_traits(new_traits); end
942
+
943
+ # @api private
944
+ #
945
+ # source://factory_bot//lib/factory_bot/definition.rb#5
946
+ def klass; end
947
+
948
+ # @api private
949
+ #
950
+ # source://factory_bot//lib/factory_bot/definition.rb#5
951
+ def klass=(_arg0); end
952
+
953
+ # @api private
954
+ #
955
+ # source://factory_bot//lib/factory_bot/definition.rb#4
956
+ def name; end
957
+
958
+ # @api private
959
+ #
960
+ # source://factory_bot//lib/factory_bot/definition.rb#74
961
+ def overridable; end
962
+
963
+ # @api private
964
+ #
965
+ # source://factory_bot//lib/factory_bot/definition.rb#103
966
+ def register_enum(enum); end
967
+
968
+ # @api private
969
+ #
970
+ # source://factory_bot//lib/factory_bot/definition.rb#4
971
+ def registered_enums; end
972
+
973
+ # @api private
974
+ #
975
+ # source://factory_bot//lib/factory_bot/definition.rb#91
976
+ def skip_create; end
977
+
978
+ # @api private
979
+ #
980
+ # source://factory_bot//lib/factory_bot/definition.rb#34
981
+ def to_create(&block); end
982
+
983
+ # @api private
984
+ #
985
+ # source://factory_bot//lib/factory_bot/definition.rb#4
986
+ def uri_manager; end
987
+
988
+ private
989
+
990
+ # @api private
991
+ #
992
+ # source://factory_bot//lib/factory_bot/definition.rb#156
993
+ def additional_traits; end
994
+
995
+ # @api private
996
+ #
997
+ # source://factory_bot//lib/factory_bot/definition.rb#176
998
+ def aggregate_from_traits_and_self(method_name, &block); end
999
+
1000
+ # @api private
1001
+ #
1002
+ # source://factory_bot//lib/factory_bot/definition.rb#201
1003
+ def automatically_register_defined_enums(klass); end
1004
+
1005
+ # @api private
1006
+ # @return [Boolean]
1007
+ #
1008
+ # source://factory_bot//lib/factory_bot/definition.rb#205
1009
+ def automatically_register_defined_enums?(klass); end
1010
+
1011
+ # @api private
1012
+ #
1013
+ # source://factory_bot//lib/factory_bot/definition.rb#127
1014
+ def base_traits; end
1015
+
1016
+ # @api private
1017
+ #
1018
+ # source://factory_bot//lib/factory_bot/definition.rb#136
1019
+ def error_with_definition_name(error); end
1020
+
1021
+ # @api private
1022
+ #
1023
+ # source://factory_bot//lib/factory_bot/definition.rb#186
1024
+ def expand_enum_traits(klass); end
1025
+
1026
+ # @api private
1027
+ #
1028
+ # source://factory_bot//lib/factory_bot/definition.rb#169
1029
+ def initialize_copy(source); end
1030
+
1031
+ # @api private
1032
+ #
1033
+ # source://factory_bot//lib/factory_bot/definition.rb#160
1034
+ def trait_by_name(name); end
1035
+
1036
+ # @api private
1037
+ #
1038
+ # source://factory_bot//lib/factory_bot/definition.rb#164
1039
+ def trait_for(name); end
1040
+ end
1041
+
1042
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#2
1043
+ class FactoryBot::DefinitionHierarchy
1044
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#3
1045
+ def callbacks(*_arg0, **_arg1, &_arg2); end
1046
+
1047
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#3
1048
+ def constructor(*_arg0, **_arg1, &_arg2); end
1049
+
1050
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#3
1051
+ def to_create(*_arg0, **_arg1, &_arg2); end
1052
+
1053
+ class << self
1054
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#5
1055
+ def build_from_definition(definition); end
1056
+
1057
+ private
1058
+
1059
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#11
1060
+ def add_callbacks(callbacks); end
1061
+
1062
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#20
1063
+ def build_constructor(&block); end
1064
+
1065
+ # source://factory_bot//lib/factory_bot/definition_hierarchy.rb#29
1066
+ def build_to_create(&block); end
1067
+ end
1068
+ end
1069
+
1070
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#2
1071
+ class FactoryBot::DefinitionProxy
1072
+ # @return [DefinitionProxy] a new instance of DefinitionProxy
1073
+ #
1074
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#26
1075
+ def initialize(definition, ignore = T.unsafe(nil)); end
1076
+
1077
+ # Adds an attribute to the factory.
1078
+ # The attribute value will be generated "lazily"
1079
+ # by calling the block whenever an instance is generated.
1080
+ # The block will not be called if the
1081
+ # attribute is overridden for a specific instance.
1082
+ #
1083
+ # Arguments:
1084
+ # * name: +Symbol+ or +String+
1085
+ # The name of this attribute. This will be assigned using "name=" for
1086
+ # generated instances.
1087
+ #
1088
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#47
1089
+ def add_attribute(name, &block); end
1090
+
1091
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#22
1092
+ def after(*_arg0, **_arg1, &_arg2); end
1093
+
1094
+ # Adds an attribute that builds an association. The associated instance will
1095
+ # be built using the same build strategy as the parent instance.
1096
+ #
1097
+ # Example:
1098
+ # factory :user do
1099
+ # name 'Joey'
1100
+ # end
1101
+ #
1102
+ # factory :post do
1103
+ # association :author, factory: :user
1104
+ # end
1105
+ #
1106
+ # Arguments:
1107
+ # * name: +Symbol+
1108
+ # The name of this attribute.
1109
+ # * options: +Hash+
1110
+ #
1111
+ # Options:
1112
+ # * factory: +Symbol+ or +String+
1113
+ # The name of the factory to use when building the associated instance.
1114
+ # If no name is given, the name of the attribute is assumed to be the
1115
+ # name of the factory. For example, a "user" association will by
1116
+ # default use the "user" factory.
1117
+ #
1118
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#155
1119
+ def association(name, *options); end
1120
+
1121
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#22
1122
+ def before(*_arg0, **_arg1, &_arg2); end
1123
+
1124
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#22
1125
+ def callback(*_arg0, **_arg1, &_arg2); end
1126
+
1127
+ # Returns the value of attribute child_factories.
1128
+ #
1129
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#24
1130
+ def child_factories; end
1131
+
1132
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#175
1133
+ def factory(name, options = T.unsafe(nil), &block); end
1134
+
1135
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#241
1136
+ def initialize_with(&block); end
1137
+
1138
+ # Calls add_attribute using the missing method name as the name of the
1139
+ # attribute, so that:
1140
+ #
1141
+ # factory :user do
1142
+ # name { 'Billy Idol' }
1143
+ # end
1144
+ #
1145
+ # and:
1146
+ #
1147
+ # factory :user do
1148
+ # add_attribute(:name) { 'Billy Idol' }
1149
+ # end
1150
+ #
1151
+ # are equivalent.
1152
+ #
1153
+ # If no argument or block is given, factory_bot will first look for an
1154
+ # association, then for a sequence, and finally for a trait with the same
1155
+ # name. This means that given an "admin" trait, an "email" sequence, and an
1156
+ # "account" factory:
1157
+ #
1158
+ # factory :user, traits: [:admin] do
1159
+ # email { generate(:email) }
1160
+ # association :account
1161
+ # end
1162
+ #
1163
+ # and:
1164
+ #
1165
+ # factory :user do
1166
+ # admin
1167
+ # email
1168
+ # account
1169
+ # end
1170
+ #
1171
+ # are equivalent.
1172
+ #
1173
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#91
1174
+ def method_missing(name, *args, &block); end
1175
+
1176
+ # Adds an attribute that will have unique values generated by a sequence with
1177
+ # a specified format.
1178
+ #
1179
+ # The result of:
1180
+ # factory :user do
1181
+ # sequence(:email) { |n| "person#{n}@example.com" }
1182
+ # end
1183
+ #
1184
+ # Is equal to:
1185
+ # sequence(:email) { |n| "person#{n}@example.com" }
1186
+ #
1187
+ # factory :user do
1188
+ # email { FactoryBot.generate(:email) }
1189
+ # end
1190
+ #
1191
+ # Except that no globally available sequence will be defined.
1192
+ #
1193
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#122
1194
+ def sequence(name, *args, &block); end
1195
+
1196
+ # @raise [FactoryBot::MethodDefinitionError]
1197
+ #
1198
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#32
1199
+ def singleton_method_added(name); end
1200
+
1201
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#171
1202
+ def skip_create; end
1203
+
1204
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#167
1205
+ def to_create(&block); end
1206
+
1207
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#179
1208
+ def trait(name, &block); end
1209
+
1210
+ # Creates traits for enumerable values.
1211
+ #
1212
+ # Example:
1213
+ # factory :task do
1214
+ # traits_for_enum :status, [:started, :finished]
1215
+ # end
1216
+ #
1217
+ # Equivalent to:
1218
+ # factory :task do
1219
+ # trait :started do
1220
+ # status { :started }
1221
+ # end
1222
+ #
1223
+ # trait :finished do
1224
+ # status { :finished }
1225
+ # end
1226
+ # end
1227
+ #
1228
+ # Example:
1229
+ # factory :task do
1230
+ # traits_for_enum :status, {started: 1, finished: 2}
1231
+ # end
1232
+ #
1233
+ # Example:
1234
+ # class Task
1235
+ # def statuses
1236
+ # {started: 1, finished: 2}
1237
+ # end
1238
+ # end
1239
+ #
1240
+ # factory :task do
1241
+ # traits_for_enum :status
1242
+ # end
1243
+ #
1244
+ # Both equivalent to:
1245
+ # factory :task do
1246
+ # trait :started do
1247
+ # status { 1 }
1248
+ # end
1249
+ #
1250
+ # trait :finished do
1251
+ # status { 2 }
1252
+ # end
1253
+ # end
1254
+ #
1255
+ #
1256
+ # Arguments:
1257
+ # attribute_name: +Symbol+ or +String+
1258
+ # the name of the attribute these traits will set the value of
1259
+ # values: +Array+, +Hash+, or other +Enumerable+
1260
+ # An array of trait names, or a mapping of trait names to values for
1261
+ # those traits. When this argument is not provided, factory_bot will
1262
+ # attempt to get the values by calling the pluralized `attribute_name`
1263
+ # class method.
1264
+ #
1265
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#237
1266
+ def traits_for_enum(attribute_name, values = T.unsafe(nil)); end
1267
+
1268
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#52
1269
+ def transient(&block); end
1270
+
1271
+ private
1272
+
1273
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#247
1274
+ def __declare_attribute__(name, block); end
1275
+
1276
+ # If the inline sequence has already been registered by a parent,
1277
+ # return that one, otherwise register and return the given sequence
1278
+ #
1279
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#264
1280
+ def __fetch_or_register_sequence(sequence); end
1281
+
1282
+ # @return [Boolean]
1283
+ #
1284
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#256
1285
+ def __valid_association_options?(options); end
1286
+ end
1287
+
1288
+ # source://factory_bot//lib/factory_bot/definition_proxy.rb#3
1289
+ FactoryBot::DefinitionProxy::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array)
1290
+
1291
+ # source://factory_bot//lib/factory_bot.rb#49
1292
+ FactoryBot::Deprecation = T.let(T.unsafe(nil), ActiveSupport::Deprecation)
1293
+
1294
+ # Raised when a factory is defined with the same name as a previously-defined factory.
1295
+ #
1296
+ # source://factory_bot//lib/factory_bot/errors.rb#12
1297
+ class FactoryBot::DuplicateDefinitionError < ::RuntimeError; end
1298
+
1299
+ # @api private
1300
+ #
1301
+ # source://factory_bot//lib/factory_bot/enum.rb#3
1302
+ class FactoryBot::Enum
1303
+ # @api private
1304
+ # @return [Enum] a new instance of Enum
1305
+ #
1306
+ # source://factory_bot//lib/factory_bot/enum.rb#4
1307
+ def initialize(attribute_name, values = T.unsafe(nil)); end
1308
+
1309
+ # @api private
1310
+ #
1311
+ # source://factory_bot//lib/factory_bot/enum.rb#9
1312
+ def build_traits(klass); end
1313
+
1314
+ private
1315
+
1316
+ # @api private
1317
+ #
1318
+ # source://factory_bot//lib/factory_bot/enum.rb#21
1319
+ def build_trait(trait_name, attribute_name, value); end
1320
+
1321
+ # @api private
1322
+ #
1323
+ # source://factory_bot//lib/factory_bot/enum.rb#17
1324
+ def enum_values(klass); end
1325
+ end
1326
+
1327
+ # source://factory_bot//lib/factory_bot/evaluation.rb#2
1328
+ class FactoryBot::Evaluation
1329
+ # @return [Evaluation] a new instance of Evaluation
1330
+ #
1331
+ # source://factory_bot//lib/factory_bot/evaluation.rb#3
1332
+ def initialize(evaluator, attribute_assigner, to_create, observer); end
1333
+
1334
+ # source://factory_bot//lib/factory_bot/evaluation.rb#12
1335
+ def create(result_instance); end
1336
+
1337
+ # source://factory_bot//lib/factory_bot/evaluation.rb#10
1338
+ def hash(*_arg0, **_arg1, &_arg2); end
1339
+
1340
+ # source://factory_bot//lib/factory_bot/evaluation.rb#19
1341
+ def notify(name, result_instance); end
1342
+
1343
+ # source://factory_bot//lib/factory_bot/evaluation.rb#10
1344
+ def object(*_arg0, **_arg1, &_arg2); end
1345
+ end
1346
+
1347
+ # @api private
1348
+ #
1349
+ # source://factory_bot//lib/factory_bot/evaluator.rb#5
1350
+ class FactoryBot::Evaluator
1351
+ # @api private
1352
+ # @return [Evaluator] a new instance of Evaluator
1353
+ #
1354
+ # source://factory_bot//lib/factory_bot/evaluator.rb#12
1355
+ def initialize(build_strategy, overrides = T.unsafe(nil)); end
1356
+
1357
+ # @api private
1358
+ #
1359
+ # source://factory_bot//lib/factory_bot/evaluator.rb#49
1360
+ def __override_names__; end
1361
+
1362
+ # @api private
1363
+ #
1364
+ # source://factory_bot//lib/factory_bot/evaluator.rb#23
1365
+ def association(factory_name, *traits_and_overrides); end
1366
+
1367
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1368
+ def attribute_lists; end
1369
+
1370
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1371
+ def attribute_lists=(_arg0); end
1372
+
1373
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1374
+ def attribute_lists?; end
1375
+
1376
+ # @api private
1377
+ #
1378
+ # source://factory_bot//lib/factory_bot/evaluator.rb#53
1379
+ def increment_sequence(sequence, scope: T.unsafe(nil)); end
1380
+
1381
+ # @api private
1382
+ #
1383
+ # source://factory_bot//lib/factory_bot/evaluator.rb#35
1384
+ def instance; end
1385
+
1386
+ # @api private
1387
+ #
1388
+ # source://factory_bot//lib/factory_bot/evaluator.rb#35
1389
+ def instance=(_arg0); end
1390
+
1391
+ # @api private
1392
+ #
1393
+ # source://factory_bot//lib/factory_bot/evaluator.rb#37
1394
+ def method_missing(method_name, *_arg1, **_arg2, &_arg3); end
1395
+
1396
+ private
1397
+
1398
+ # @api private
1399
+ # @return [Boolean]
1400
+ #
1401
+ # source://factory_bot//lib/factory_bot/evaluator.rb#45
1402
+ def respond_to_missing?(method_name, _include_private = T.unsafe(nil)); end
1403
+
1404
+ class << self
1405
+ # @api private
1406
+ #
1407
+ # source://factory_bot//lib/factory_bot/evaluator.rb#64
1408
+ def attribute_list; end
1409
+
1410
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1411
+ def attribute_lists; end
1412
+
1413
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1414
+ def attribute_lists=(value); end
1415
+
1416
+ # source://factory_bot//lib/factory_bot/evaluator.rb#6
1417
+ def attribute_lists?; end
1418
+
1419
+ # @api private
1420
+ #
1421
+ # source://factory_bot//lib/factory_bot/evaluator.rb#72
1422
+ def define_attribute(name, &block); end
1423
+
1424
+ private
1425
+
1426
+ # source://activesupport/8.1.2/lib/active_support/class_attribute.rb#15
1427
+ def __class_attr_attribute_lists; end
1428
+
1429
+ # source://activesupport/8.1.2/lib/active_support/class_attribute.rb#17
1430
+ def __class_attr_attribute_lists=(new_value); end
1431
+ end
1432
+ end
1433
+
1434
+ # @api private
1435
+ #
1436
+ # source://factory_bot//lib/factory_bot/evaluator_class_definer.rb#3
1437
+ class FactoryBot::EvaluatorClassDefiner
1438
+ # @api private
1439
+ # @return [EvaluatorClassDefiner] a new instance of EvaluatorClassDefiner
1440
+ #
1441
+ # source://factory_bot//lib/factory_bot/evaluator_class_definer.rb#4
1442
+ def initialize(attributes, parent_class); end
1443
+
1444
+ # @api private
1445
+ #
1446
+ # source://factory_bot//lib/factory_bot/evaluator_class_definer.rb#13
1447
+ def evaluator_class; end
1448
+ end
1449
+
1450
+ # @api private
1451
+ #
1452
+ # source://factory_bot//lib/factory_bot/factory.rb#6
1453
+ class FactoryBot::Factory
1454
+ # @api private
1455
+ # @return [Factory] a new instance of Factory
1456
+ #
1457
+ # source://factory_bot//lib/factory_bot/factory.rb#9
1458
+ def initialize(name, options = T.unsafe(nil)); end
1459
+
1460
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1461
+ def add_callback(*_arg0, **_arg1, &_arg2); end
1462
+
1463
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1464
+ def append_traits(*_arg0, **_arg1, &_arg2); end
1465
+
1466
+ # @api private
1467
+ #
1468
+ # source://factory_bot//lib/factory_bot/factory.rb#58
1469
+ def associations; end
1470
+
1471
+ # @api private
1472
+ #
1473
+ # source://factory_bot//lib/factory_bot/factory.rb#24
1474
+ def build_class; end
1475
+
1476
+ # @api private
1477
+ #
1478
+ # source://factory_bot//lib/factory_bot/factory.rb#91
1479
+ def compile; end
1480
+
1481
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1482
+ def constructor(*_arg0, **_arg1, &_arg2); end
1483
+
1484
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1485
+ def declare_attribute(*_arg0, **_arg1, &_arg2); end
1486
+
1487
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1488
+ def define_trait(*_arg0, **_arg1, &_arg2); end
1489
+
1490
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1491
+ def defined_traits(*_arg0, **_arg1, &_arg2); end
1492
+
1493
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1494
+ def defined_traits_names(*_arg0, **_arg1, &_arg2); end
1495
+
1496
+ # @api private
1497
+ #
1498
+ # source://factory_bot//lib/factory_bot/factory.rb#7
1499
+ def definition; end
1500
+
1501
+ # @api private
1502
+ #
1503
+ # source://factory_bot//lib/factory_bot/factory.rb#54
1504
+ def human_names; end
1505
+
1506
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1507
+ def inherit_traits(*_arg0, **_arg1, &_arg2); end
1508
+
1509
+ # @api private
1510
+ #
1511
+ # source://factory_bot//lib/factory_bot/factory.rb#7
1512
+ def name; end
1513
+
1514
+ # Names for this factory, including aliases.
1515
+ #
1516
+ # Example:
1517
+ #
1518
+ # factory :user, aliases: [:author] do
1519
+ # # ...
1520
+ # end
1521
+ #
1522
+ # FactoryBot.create(:author).class
1523
+ # # => User
1524
+ #
1525
+ # Because an attribute defined without a value or block will build an
1526
+ # association with the same name, this allows associations to be defined
1527
+ # without factories, such as:
1528
+ #
1529
+ # factory :user, aliases: [:author] do
1530
+ # # ...
1531
+ # end
1532
+ #
1533
+ # factory :post do
1534
+ # author
1535
+ # end
1536
+ #
1537
+ # FactoryBot.create(:post).author.class
1538
+ # # => User
1539
+ #
1540
+ # @api private
1541
+ #
1542
+ # source://factory_bot//lib/factory_bot/factory.rb#87
1543
+ def names; end
1544
+
1545
+ # @api private
1546
+ #
1547
+ # source://factory_bot//lib/factory_bot/factory.rb#34
1548
+ def run(build_strategy, overrides, &block); end
1549
+
1550
+ # source://factory_bot//lib/factory_bot/factory.rb#20
1551
+ def to_create(*_arg0, **_arg1, &_arg2); end
1552
+
1553
+ # @api private
1554
+ #
1555
+ # source://factory_bot//lib/factory_bot/factory.rb#101
1556
+ def with_traits(traits); end
1557
+
1558
+ protected
1559
+
1560
+ # @api private
1561
+ #
1562
+ # source://factory_bot//lib/factory_bot/factory.rb#117
1563
+ def attributes; end
1564
+
1565
+ # @api private
1566
+ #
1567
+ # source://factory_bot//lib/factory_bot/factory.rb#132
1568
+ def build_hierarchy; end
1569
+
1570
+ # @api private
1571
+ #
1572
+ # source://factory_bot//lib/factory_bot/factory.rb#136
1573
+ def callbacks; end
1574
+
1575
+ # @api private
1576
+ #
1577
+ # source://factory_bot//lib/factory_bot/factory.rb#109
1578
+ def class_name; end
1579
+
1580
+ # @api private
1581
+ #
1582
+ # source://factory_bot//lib/factory_bot/factory.rb#144
1583
+ def compiled_constructor; end
1584
+
1585
+ # @api private
1586
+ #
1587
+ # source://factory_bot//lib/factory_bot/factory.rb#140
1588
+ def compiled_to_create; end
1589
+
1590
+ # @api private
1591
+ #
1592
+ # source://factory_bot//lib/factory_bot/factory.rb#113
1593
+ def evaluator_class; end
1594
+
1595
+ # @api private
1596
+ #
1597
+ # source://factory_bot//lib/factory_bot/factory.rb#124
1598
+ def hierarchy_class; end
1599
+
1600
+ # @api private
1601
+ #
1602
+ # source://factory_bot//lib/factory_bot/factory.rb#128
1603
+ def hierarchy_instance; end
1604
+
1605
+ private
1606
+
1607
+ # @api private
1608
+ #
1609
+ # source://factory_bot//lib/factory_bot/factory.rb#150
1610
+ def assert_valid_options(options); end
1611
+
1612
+ # @api private
1613
+ #
1614
+ # source://factory_bot//lib/factory_bot/factory.rb#162
1615
+ def inherit_parent_traits; end
1616
+
1617
+ # @api private
1618
+ #
1619
+ # source://factory_bot//lib/factory_bot/factory.rb#169
1620
+ def initialize_copy(source); end
1621
+
1622
+ # @api private
1623
+ #
1624
+ # source://factory_bot//lib/factory_bot/factory.rb#154
1625
+ def parent; end
1626
+ end
1627
+
1628
+ # source://factory_bot//lib/factory_bot/factory_runner.rb#2
1629
+ class FactoryBot::FactoryRunner
1630
+ # @return [FactoryRunner] a new instance of FactoryRunner
1631
+ #
1632
+ # source://factory_bot//lib/factory_bot/factory_runner.rb#3
1633
+ def initialize(name, strategy, traits_and_overrides); end
1634
+
1635
+ # source://factory_bot//lib/factory_bot/factory_runner.rb#11
1636
+ def run(runner_strategy = T.unsafe(nil), &block); end
1637
+ end
1638
+
1639
+ # @api private
1640
+ #
1641
+ # source://factory_bot//lib/factory_bot/internal.rb#3
1642
+ module FactoryBot::Internal
1643
+ class << self
1644
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1645
+ def after(*_arg0, **_arg1, &_arg2); end
1646
+
1647
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1648
+ def before(*_arg0, **_arg1, &_arg2); end
1649
+
1650
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1651
+ def callbacks(*_arg0, **_arg1, &_arg2); end
1652
+
1653
+ # @api private
1654
+ #
1655
+ # source://factory_bot//lib/factory_bot/internal.rb#19
1656
+ def configuration; end
1657
+
1658
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1659
+ def constructor(*_arg0, **_arg1, &_arg2); end
1660
+
1661
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1662
+ def factories(*_arg0, **_arg1, &_arg2); end
1663
+
1664
+ # @api private
1665
+ #
1666
+ # source://factory_bot//lib/factory_bot/internal.rb#86
1667
+ def factory_by_name(name); end
1668
+
1669
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1670
+ def initialize_with(*_arg0, **_arg1, &_arg2); end
1671
+
1672
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1673
+ def inline_sequences(*_arg0, **_arg1, &_arg2); end
1674
+
1675
+ # @api private
1676
+ #
1677
+ # source://factory_bot//lib/factory_bot/internal.rb#99
1678
+ def register_default_strategies; end
1679
+
1680
+ # @api private
1681
+ #
1682
+ # source://factory_bot//lib/factory_bot/internal.rb#79
1683
+ def register_factory(factory); end
1684
+
1685
+ # @api private
1686
+ #
1687
+ # source://factory_bot//lib/factory_bot/internal.rb#27
1688
+ def register_inline_sequence(sequence); end
1689
+
1690
+ # @api private
1691
+ #
1692
+ # source://factory_bot//lib/factory_bot/internal.rb#47
1693
+ def register_sequence(sequence); end
1694
+
1695
+ # @api private
1696
+ #
1697
+ # source://factory_bot//lib/factory_bot/internal.rb#90
1698
+ def register_strategy(strategy_name, strategy_class); end
1699
+
1700
+ # @api private
1701
+ #
1702
+ # source://factory_bot//lib/factory_bot/internal.rb#36
1703
+ def register_trait(trait); end
1704
+
1705
+ # @api private
1706
+ #
1707
+ # source://factory_bot//lib/factory_bot/internal.rb#23
1708
+ def reset_configuration; end
1709
+
1710
+ # @api private
1711
+ #
1712
+ # source://factory_bot//lib/factory_bot/internal.rb#32
1713
+ def rewind_inline_sequences; end
1714
+
1715
+ # @api private
1716
+ #
1717
+ # source://factory_bot//lib/factory_bot/internal.rb#63
1718
+ def rewind_sequence(*uri_parts); end
1719
+
1720
+ # @api private
1721
+ #
1722
+ # source://factory_bot//lib/factory_bot/internal.rb#58
1723
+ def rewind_sequences; end
1724
+
1725
+ # @api private
1726
+ #
1727
+ # source://factory_bot//lib/factory_bot/internal.rb#54
1728
+ def sequence_by_name(name); end
1729
+
1730
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1731
+ def sequences(*_arg0, **_arg1, &_arg2); end
1732
+
1733
+ # @api private
1734
+ #
1735
+ # source://factory_bot//lib/factory_bot/internal.rb#72
1736
+ def set_sequence(*uri_parts, value); end
1737
+
1738
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1739
+ def skip_create(*_arg0, **_arg1, &_arg2); end
1740
+
1741
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1742
+ def strategies(*_arg0, **_arg1, &_arg2); end
1743
+
1744
+ # @api private
1745
+ #
1746
+ # source://factory_bot//lib/factory_bot/internal.rb#95
1747
+ def strategy_by_name(name); end
1748
+
1749
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1750
+ def to_create(*_arg0, **_arg1, &_arg2); end
1751
+
1752
+ # @api private
1753
+ #
1754
+ # source://factory_bot//lib/factory_bot/internal.rb#43
1755
+ def trait_by_name(name, klass); end
1756
+
1757
+ # source://factory_bot//lib/factory_bot/internal.rb#5
1758
+ def traits(*_arg0, **_arg1, &_arg2); end
1759
+
1760
+ private
1761
+
1762
+ # @api private
1763
+ #
1764
+ # source://factory_bot//lib/factory_bot/internal.rb#109
1765
+ def build_uri(*_arg0, **_arg1, &_arg2); end
1766
+
1767
+ # @api private
1768
+ #
1769
+ # source://factory_bot//lib/factory_bot/internal.rb#113
1770
+ def fail_argument_count(received, expected); end
1771
+
1772
+ # @api private
1773
+ #
1774
+ # source://factory_bot//lib/factory_bot/internal.rb#118
1775
+ def fail_unregistered_sequence(uri); end
1776
+ end
1777
+ end
1778
+
1779
+ # Raised when a callback is defined that has an invalid name
1780
+ #
1781
+ # source://factory_bot//lib/factory_bot/errors.rb#9
1782
+ class FactoryBot::InvalidCallbackNameError < ::RuntimeError; end
1783
+
1784
+ # Raised when any factory is considered invalid
1785
+ #
1786
+ # source://factory_bot//lib/factory_bot/errors.rb#27
1787
+ class FactoryBot::InvalidFactoryError < ::RuntimeError; end
1788
+
1789
+ # source://factory_bot//lib/factory_bot/linter.rb#2
1790
+ class FactoryBot::Linter
1791
+ # @return [Linter] a new instance of Linter
1792
+ #
1793
+ # source://factory_bot//lib/factory_bot/linter.rb#3
1794
+ def initialize(factories, strategy: T.unsafe(nil), traits: T.unsafe(nil), verbose: T.unsafe(nil)); end
1795
+
1796
+ # source://factory_bot//lib/factory_bot/linter.rb#11
1797
+ def lint!; end
1798
+
1799
+ private
1800
+
1801
+ # source://factory_bot//lib/factory_bot/linter.rb#21
1802
+ def calculate_invalid_factories; end
1803
+
1804
+ # source://factory_bot//lib/factory_bot/linter.rb#90
1805
+ def error_message; end
1806
+
1807
+ # source://factory_bot//lib/factory_bot/linter.rb#102
1808
+ def error_message_type; end
1809
+
1810
+ # Returns the value of attribute factories_to_lint.
1811
+ #
1812
+ # source://factory_bot//lib/factory_bot/linter.rb#19
1813
+ def factories_to_lint; end
1814
+
1815
+ # Returns the value of attribute factory_strategy.
1816
+ #
1817
+ # source://factory_bot//lib/factory_bot/linter.rb#19
1818
+ def factory_strategy; end
1819
+
1820
+ # source://factory_bot//lib/factory_bot/linter.rb#110
1821
+ def in_transaction; end
1822
+
1823
+ # Returns the value of attribute invalid_factories.
1824
+ #
1825
+ # source://factory_bot//lib/factory_bot/linter.rb#19
1826
+ def invalid_factories; end
1827
+
1828
+ # source://factory_bot//lib/factory_bot/linter.rb#62
1829
+ def lint(factory); end
1830
+
1831
+ # source://factory_bot//lib/factory_bot/linter.rb#70
1832
+ def lint_factory(factory); end
1833
+
1834
+ # source://factory_bot//lib/factory_bot/linter.rb#80
1835
+ def lint_traits(factory); end
1836
+ end
1837
+
1838
+ # source://factory_bot//lib/factory_bot/linter.rb#28
1839
+ class FactoryBot::Linter::FactoryError
1840
+ # @return [FactoryError] a new instance of FactoryError
1841
+ #
1842
+ # source://factory_bot//lib/factory_bot/linter.rb#29
1843
+ def initialize(wrapped_error, factory); end
1844
+
1845
+ # source://factory_bot//lib/factory_bot/linter.rb#46
1846
+ def location; end
1847
+
1848
+ # source://factory_bot//lib/factory_bot/linter.rb#34
1849
+ def message; end
1850
+
1851
+ # source://factory_bot//lib/factory_bot/linter.rb#39
1852
+ def verbose_message; end
1853
+ end
1854
+
1855
+ # source://factory_bot//lib/factory_bot/linter.rb#51
1856
+ class FactoryBot::Linter::FactoryTraitError < ::FactoryBot::Linter::FactoryError
1857
+ # @return [FactoryTraitError] a new instance of FactoryTraitError
1858
+ #
1859
+ # source://factory_bot//lib/factory_bot/linter.rb#52
1860
+ def initialize(wrapped_error, factory, trait_name); end
1861
+
1862
+ # source://factory_bot//lib/factory_bot/linter.rb#57
1863
+ def location; end
1864
+ end
1865
+
1866
+ # Raised when a method is defined in a factory or trait with arguments
1867
+ #
1868
+ # source://factory_bot//lib/factory_bot/errors.rb#24
1869
+ class FactoryBot::MethodDefinitionError < ::RuntimeError; end
1870
+
1871
+ # @api private
1872
+ #
1873
+ # source://factory_bot//lib/factory_bot/null_factory.rb#3
1874
+ class FactoryBot::NullFactory
1875
+ # @api private
1876
+ # @return [NullFactory] a new instance of NullFactory
1877
+ #
1878
+ # source://factory_bot//lib/factory_bot/null_factory.rb#6
1879
+ def initialize; end
1880
+
1881
+ # source://factory_bot//lib/factory_bot/null_factory.rb#10
1882
+ def attributes(*_arg0, **_arg1, &_arg2); end
1883
+
1884
+ # source://factory_bot//lib/factory_bot/null_factory.rb#10
1885
+ def callbacks(*_arg0, **_arg1, &_arg2); end
1886
+
1887
+ # @api private
1888
+ #
1889
+ # source://factory_bot//lib/factory_bot/null_factory.rb#16
1890
+ def class_name; end
1891
+
1892
+ # @api private
1893
+ #
1894
+ # source://factory_bot//lib/factory_bot/null_factory.rb#13
1895
+ def compile; end
1896
+
1897
+ # source://factory_bot//lib/factory_bot/null_factory.rb#10
1898
+ def constructor(*_arg0, **_arg1, &_arg2); end
1899
+
1900
+ # source://factory_bot//lib/factory_bot/null_factory.rb#10
1901
+ def defined_traits(*_arg0, **_arg1, &_arg2); end
1902
+
1903
+ # @api private
1904
+ #
1905
+ # source://factory_bot//lib/factory_bot/null_factory.rb#4
1906
+ def definition; end
1907
+
1908
+ # @api private
1909
+ #
1910
+ # source://factory_bot//lib/factory_bot/null_factory.rb#19
1911
+ def evaluator_class; end
1912
+
1913
+ # @api private
1914
+ #
1915
+ # source://factory_bot//lib/factory_bot/null_factory.rb#23
1916
+ def hierarchy_class; end
1917
+
1918
+ # source://factory_bot//lib/factory_bot/null_factory.rb#10
1919
+ def to_create(*_arg0, **_arg1, &_arg2); end
1920
+ end
1921
+
1922
+ # @api private
1923
+ #
1924
+ # source://factory_bot//lib/factory_bot/null_object.rb#3
1925
+ class FactoryBot::NullObject < ::BasicObject
1926
+ # @api private
1927
+ # @return [NullObject] a new instance of NullObject
1928
+ #
1929
+ # source://factory_bot//lib/factory_bot/null_object.rb#4
1930
+ def initialize(methods_to_respond_to); end
1931
+
1932
+ # @api private
1933
+ #
1934
+ # source://factory_bot//lib/factory_bot/null_object.rb#8
1935
+ def method_missing(name, *args, &block); end
1936
+
1937
+ # @api private
1938
+ # @return [Boolean]
1939
+ #
1940
+ # source://factory_bot//lib/factory_bot/null_object.rb#16
1941
+ def respond_to?(method); end
1942
+ end
1943
+
1944
+ # source://factory_bot//lib/factory_bot/registry.rb#4
1945
+ class FactoryBot::Registry
1946
+ include ::Enumerable
1947
+
1948
+ # @return [Registry] a new instance of Registry
1949
+ #
1950
+ # source://factory_bot//lib/factory_bot/registry.rb#9
1951
+ def initialize(name); end
1952
+
1953
+ # source://factory_bot//lib/factory_bot/registry.rb#22
1954
+ def [](name); end
1955
+
1956
+ # source://factory_bot//lib/factory_bot/registry.rb#14
1957
+ def clear; end
1958
+
1959
+ # source://factory_bot//lib/factory_bot/registry.rb#18
1960
+ def each(&block); end
1961
+
1962
+ # source://factory_bot//lib/factory_bot/registry.rb#22
1963
+ def find(name); end
1964
+
1965
+ # Returns the value of attribute name.
1966
+ #
1967
+ # source://factory_bot//lib/factory_bot/registry.rb#7
1968
+ def name; end
1969
+
1970
+ # source://factory_bot//lib/factory_bot/registry.rb#30
1971
+ def register(name, item); end
1972
+
1973
+ # @return [Boolean]
1974
+ #
1975
+ # source://factory_bot//lib/factory_bot/registry.rb#34
1976
+ def registered?(name); end
1977
+
1978
+ private
1979
+
1980
+ # source://factory_bot//lib/factory_bot/registry.rb#40
1981
+ def key_error_with_custom_message(key_error); end
1982
+
1983
+ # source://factory_bot//lib/factory_bot/registry.rb#50
1984
+ def new_key_error(message, key_error); end
1985
+ end
1986
+
1987
+ # Sequences are defined using sequence within a FactoryBot.define block.
1988
+ # Sequence values are generated using next.
1989
+ #
1990
+ # @api private
1991
+ #
1992
+ # source://factory_bot//lib/factory_bot/sequence.rb#7
1993
+ class FactoryBot::Sequence
1994
+ # @api private
1995
+ # @return [Sequence] a new instance of Sequence
1996
+ #
1997
+ # source://factory_bot//lib/factory_bot/sequence.rb#24
1998
+ def initialize(name, *args, &proc); end
1999
+
2000
+ # @api private
2001
+ #
2002
+ # source://factory_bot//lib/factory_bot/sequence.rb#8
2003
+ def aliases; end
2004
+
2005
+ # @api private
2006
+ # @return [Boolean]
2007
+ #
2008
+ # source://factory_bot//lib/factory_bot/sequence.rb#61
2009
+ def for_factory?(test_factory_name); end
2010
+
2011
+ # @api private
2012
+ # @return [Boolean]
2013
+ #
2014
+ # source://factory_bot//lib/factory_bot/sequence.rb#53
2015
+ def has_name?(test_name); end
2016
+
2017
+ # @api private
2018
+ # @return [Boolean]
2019
+ #
2020
+ # source://factory_bot//lib/factory_bot/sequence.rb#57
2021
+ def has_uri?(uri); end
2022
+
2023
+ # @api private
2024
+ #
2025
+ # source://factory_bot//lib/factory_bot/sequence.rb#8
2026
+ def name; end
2027
+
2028
+ # @api private
2029
+ #
2030
+ # source://factory_bot//lib/factory_bot/sequence.rb#49
2031
+ def names; end
2032
+
2033
+ # @api private
2034
+ #
2035
+ # source://factory_bot//lib/factory_bot/sequence.rb#37
2036
+ def next(scope = T.unsafe(nil)); end
2037
+
2038
+ # @api private
2039
+ #
2040
+ # source://factory_bot//lib/factory_bot/sequence.rb#65
2041
+ def rewind; end
2042
+
2043
+ # If it's an Integer based sequence, set the new value directly,
2044
+ # else rewind and seek from the beginning until a match is found.
2045
+ #
2046
+ # @api private
2047
+ #
2048
+ # source://factory_bot//lib/factory_bot/sequence.rb#73
2049
+ def set_value(new_value); end
2050
+
2051
+ # @api private
2052
+ #
2053
+ # source://factory_bot//lib/factory_bot/sequence.rb#8
2054
+ def uri_manager; end
2055
+
2056
+ protected
2057
+
2058
+ # @api private
2059
+ #
2060
+ # source://factory_bot//lib/factory_bot/sequence.rb#85
2061
+ def proc; end
2062
+
2063
+ private
2064
+
2065
+ # @api private
2066
+ # @return [Boolean]
2067
+ #
2068
+ # source://factory_bot//lib/factory_bot/sequence.rb#97
2069
+ def can_set_value_by_index?; end
2070
+
2071
+ # @api private
2072
+ # @return [Boolean]
2073
+ #
2074
+ # source://factory_bot//lib/factory_bot/sequence.rb#142
2075
+ def can_set_value_directly?(value); end
2076
+
2077
+ # @api private
2078
+ #
2079
+ # source://factory_bot//lib/factory_bot/sequence.rb#148
2080
+ def fail_value_not_found(value); end
2081
+
2082
+ # @api private
2083
+ #
2084
+ # source://factory_bot//lib/factory_bot/sequence.rb#93
2085
+ def increment_value; end
2086
+
2087
+ # @api private
2088
+ #
2089
+ # source://factory_bot//lib/factory_bot/sequence.rb#134
2090
+ def reset_original_value(original_value); end
2091
+
2092
+ # Rewind index and seek until the value is found or the max attempts
2093
+ # have been tried. If not found, the sequence is rewound to its original value
2094
+ #
2095
+ # @api private
2096
+ #
2097
+ # source://factory_bot//lib/factory_bot/sequence.rb#114
2098
+ def seek_value(value); end
2099
+
2100
+ # Set to the given value, or fail if not found
2101
+ #
2102
+ # @api private
2103
+ #
2104
+ # source://factory_bot//lib/factory_bot/sequence.rb#104
2105
+ def set_value_by_index(value); end
2106
+
2107
+ # @api private
2108
+ #
2109
+ # source://factory_bot//lib/factory_bot/sequence.rb#89
2110
+ def value; end
2111
+
2112
+ class << self
2113
+ # @api private
2114
+ #
2115
+ # source://factory_bot//lib/factory_bot/sequence.rb#10
2116
+ def find(*uri_parts); end
2117
+
2118
+ # @api private
2119
+ #
2120
+ # source://factory_bot//lib/factory_bot/sequence.rb#18
2121
+ def find_by_uri(uri); end
2122
+ end
2123
+ end
2124
+
2125
+ # @api private
2126
+ #
2127
+ # source://factory_bot//lib/factory_bot/sequence.rb#152
2128
+ class FactoryBot::Sequence::EnumeratorAdapter
2129
+ # @api private
2130
+ # @return [EnumeratorAdapter] a new instance of EnumeratorAdapter
2131
+ #
2132
+ # source://factory_bot//lib/factory_bot/sequence.rb#153
2133
+ def initialize(initial_value); end
2134
+
2135
+ # @api private
2136
+ # @return [Boolean]
2137
+ #
2138
+ # source://factory_bot//lib/factory_bot/sequence.rb#177
2139
+ def integer_value?; end
2140
+
2141
+ # @api private
2142
+ #
2143
+ # source://factory_bot//lib/factory_bot/sequence.rb#161
2144
+ def next; end
2145
+
2146
+ # @api private
2147
+ #
2148
+ # source://factory_bot//lib/factory_bot/sequence.rb#157
2149
+ def peek; end
2150
+
2151
+ # @api private
2152
+ #
2153
+ # source://factory_bot//lib/factory_bot/sequence.rb#165
2154
+ def rewind; end
2155
+
2156
+ # @api private
2157
+ #
2158
+ # source://factory_bot//lib/factory_bot/sequence.rb#169
2159
+ def set_value(new_value); end
2160
+
2161
+ private
2162
+
2163
+ # @api private
2164
+ #
2165
+ # source://factory_bot//lib/factory_bot/sequence.rb#183
2166
+ def first_value; end
2167
+
2168
+ # @api private
2169
+ #
2170
+ # source://factory_bot//lib/factory_bot/sequence.rb#191
2171
+ def initial_value; end
2172
+
2173
+ # @api private
2174
+ #
2175
+ # source://factory_bot//lib/factory_bot/sequence.rb#187
2176
+ def value; end
2177
+ end
2178
+
2179
+ # Raised when attempting to register a sequence from a dynamic attribute block
2180
+ #
2181
+ # source://factory_bot//lib/factory_bot/errors.rb#15
2182
+ class FactoryBot::SequenceAbuseError < ::RuntimeError; end
2183
+
2184
+ # source://factory_bot//lib/factory_bot/strategy/build.rb#2
2185
+ module FactoryBot::Strategy
2186
+ class << self
2187
+ # source://factory_bot//lib/factory_bot/strategy.rb#9
2188
+ def lookup_strategy(name_or_object); end
2189
+ end
2190
+ end
2191
+
2192
+ # source://factory_bot//lib/factory_bot/strategy/attributes_for.rb#3
2193
+ class FactoryBot::Strategy::AttributesFor
2194
+ # source://factory_bot//lib/factory_bot/strategy/attributes_for.rb#4
2195
+ def association(runner); end
2196
+
2197
+ # source://factory_bot//lib/factory_bot/strategy/attributes_for.rb#8
2198
+ def result(evaluation); end
2199
+
2200
+ # source://factory_bot//lib/factory_bot/strategy/attributes_for.rb#12
2201
+ def to_sym; end
2202
+ end
2203
+
2204
+ # source://factory_bot//lib/factory_bot/strategy/build.rb#3
2205
+ class FactoryBot::Strategy::Build
2206
+ # source://factory_bot//lib/factory_bot/strategy/build.rb#4
2207
+ def association(runner); end
2208
+
2209
+ # source://factory_bot//lib/factory_bot/strategy/build.rb#8
2210
+ def result(evaluation); end
2211
+
2212
+ # source://factory_bot//lib/factory_bot/strategy/build.rb#16
2213
+ def to_sym; end
2214
+ end
2215
+
2216
+ # source://factory_bot//lib/factory_bot/strategy/create.rb#3
2217
+ class FactoryBot::Strategy::Create
2218
+ # source://factory_bot//lib/factory_bot/strategy/create.rb#4
2219
+ def association(runner); end
2220
+
2221
+ # source://factory_bot//lib/factory_bot/strategy/create.rb#8
2222
+ def result(evaluation); end
2223
+
2224
+ # source://factory_bot//lib/factory_bot/strategy/create.rb#19
2225
+ def to_sym; end
2226
+ end
2227
+
2228
+ # source://factory_bot//lib/factory_bot/strategy/null.rb#3
2229
+ class FactoryBot::Strategy::Null
2230
+ # source://factory_bot//lib/factory_bot/strategy/null.rb#4
2231
+ def association(runner); end
2232
+
2233
+ # source://factory_bot//lib/factory_bot/strategy/null.rb#7
2234
+ def result(evaluation); end
2235
+
2236
+ # source://factory_bot//lib/factory_bot/strategy/null.rb#10
2237
+ def to_sym; end
2238
+ end
2239
+
2240
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#3
2241
+ class FactoryBot::Strategy::Stub
2242
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#31
2243
+ def association(runner); end
2244
+
2245
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#35
2246
+ def result(evaluation); end
2247
+
2248
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#44
2249
+ def to_sym; end
2250
+
2251
+ private
2252
+
2253
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#98
2254
+ def clear_changes_information(result_instance); end
2255
+
2256
+ # @return [Boolean]
2257
+ #
2258
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#85
2259
+ def has_settable_id?(result_instance); end
2260
+
2261
+ # @return [Boolean]
2262
+ #
2263
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#116
2264
+ def missing_created_at?(result_instance); end
2265
+
2266
+ # @return [Boolean]
2267
+ #
2268
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#122
2269
+ def missing_updated_at?(result_instance); end
2270
+
2271
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#50
2272
+ def next_id(result_instance); end
2273
+
2274
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#104
2275
+ def set_timestamps(result_instance); end
2276
+
2277
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#58
2278
+ def stub_database_interaction_on_result(result_instance); end
2279
+
2280
+ # @return [Boolean]
2281
+ #
2282
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#91
2283
+ def uuid_primary_key?(result_instance); end
2284
+
2285
+ class << self
2286
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#27
2287
+ def next_id=(id); end
2288
+ end
2289
+ end
2290
+
2291
+ # source://factory_bot//lib/factory_bot/strategy/stub.rb#6
2292
+ FactoryBot::Strategy::Stub::DISABLED_PERSISTENCE_METHODS = T.let(T.unsafe(nil), Array)
2293
+
2294
+ # @api private
2295
+ #
2296
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#3
2297
+ class FactoryBot::StrategySyntaxMethodRegistrar
2298
+ # @api private
2299
+ # @return [StrategySyntaxMethodRegistrar] a new instance of StrategySyntaxMethodRegistrar
2300
+ #
2301
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#4
2302
+ def initialize(strategy_name); end
2303
+
2304
+ # @api private
2305
+ #
2306
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#8
2307
+ def define_strategy_methods; end
2308
+
2309
+ private
2310
+
2311
+ # @api private
2312
+ #
2313
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#32
2314
+ def define_list_strategy_method; end
2315
+
2316
+ # @api private
2317
+ #
2318
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#47
2319
+ def define_pair_strategy_method; end
2320
+
2321
+ # @api private
2322
+ #
2323
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#24
2324
+ def define_singular_strategy_method; end
2325
+
2326
+ # @api private
2327
+ #
2328
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#55
2329
+ def define_syntax_method(name, &block); end
2330
+
2331
+ class << self
2332
+ # @api private
2333
+ #
2334
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#14
2335
+ def with_index(block, index); end
2336
+ end
2337
+ end
2338
+
2339
+ # source://factory_bot//lib/factory_bot/syntax/methods.rb#2
2340
+ module FactoryBot::Syntax; end
2341
+
2342
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#3
2343
+ module FactoryBot::Syntax::Default
2344
+ include ::FactoryBot::Syntax::Methods
2345
+
2346
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#6
2347
+ def define(&block); end
2348
+
2349
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#10
2350
+ def modify(&block); end
2351
+ end
2352
+
2353
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#14
2354
+ class FactoryBot::Syntax::Default::DSL
2355
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2356
+ def after(*_arg0, **_arg1, &_arg2); end
2357
+
2358
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2359
+ def before(*_arg0, **_arg1, &_arg2); end
2360
+
2361
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2362
+ def callback(*_arg0, **_arg1, &_arg2); end
2363
+
2364
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#15
2365
+ def factory(name, options = T.unsafe(nil), &block); end
2366
+
2367
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2368
+ def initialize_with(*_arg0, **_arg1, &_arg2); end
2369
+
2370
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#28
2371
+ def sequence(name, *_arg1, **_arg2, &_arg3); end
2372
+
2373
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2374
+ def skip_create(*_arg0, **_arg1, &_arg2); end
2375
+
2376
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#40
2377
+ def to_create(*_arg0, **_arg1, &_arg2); end
2378
+
2379
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#32
2380
+ def trait(name, &block); end
2381
+
2382
+ class << self
2383
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#36
2384
+ def run(block); end
2385
+ end
2386
+ end
2387
+
2388
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#49
2389
+ class FactoryBot::Syntax::Default::ModifyDSL
2390
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#50
2391
+ def factory(name, _options = T.unsafe(nil), &block); end
2392
+
2393
+ class << self
2394
+ # source://factory_bot//lib/factory_bot/syntax/default.rb#56
2395
+ def run(block); end
2396
+ end
2397
+ end
2398
+
2399
+ # This module is a container for all strategy methods provided by
2400
+ # FactoryBot. This includes all the default strategies provided ({Methods#build},
2401
+ # {Methods#create}, {Methods#build_stubbed}, and {Methods#attributes_for}), as
2402
+ # well as the complementary *_list and *_pair methods.
2403
+ #
2404
+ # @example singular factory execution
2405
+ # # basic use case
2406
+ # build(:completed_order)
2407
+ #
2408
+ # # factory yielding its result to a block
2409
+ # create(:post) do |post|
2410
+ # create(:comment, post: post)
2411
+ # end
2412
+ #
2413
+ # # factory with attribute override
2414
+ # attributes_for(:post, title: "I love Ruby!")
2415
+ #
2416
+ # # factory with traits and attribute override
2417
+ # build_stubbed(:user, :admin, :male, name: "John Doe")
2418
+ # @example multiple factory execution
2419
+ # # basic use case
2420
+ # build_list(:completed_order, 2)
2421
+ # create_list(:completed_order, 2)
2422
+ #
2423
+ # # factory with attribute override
2424
+ # attributes_for_list(:post, 4, title: "I love Ruby!")
2425
+ #
2426
+ # # factory with traits and attribute override
2427
+ # build_stubbed_list(:user, 15, :admin, :male, name: "John Doe")
2428
+ #
2429
+ # source://factory_bot//lib/factory_bot/syntax/methods.rb#32
2430
+ module FactoryBot::Syntax::Methods
2431
+ # (see #strategy_method)
2432
+ # Generates a hash of attributes for a registered factory by name.
2433
+ #
2434
+ # @return [Hash] hash of attributes for the factory
2435
+ #
2436
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#27
2437
+ def attributes_for(name, *traits_and_overrides, &block); end
2438
+
2439
+ # (see #strategy_method_list)
2440
+ #
2441
+ # @return [Array<Hash>] array of attribute hashes for the factory
2442
+ #
2443
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#35
2444
+ def attributes_for_list(name, amount, *traits_and_overrides, &block); end
2445
+
2446
+ # (see #strategy_method_pair)
2447
+ #
2448
+ # @return [Array<Hash>] pair of attribute hashes for the factory
2449
+ #
2450
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#50
2451
+ def attributes_for_pair(name, *traits_and_overrides, &block); end
2452
+
2453
+ # (see #strategy_method)
2454
+ # Builds a registered factory by name.
2455
+ #
2456
+ # @return [Object] instantiated object defined by the factory
2457
+ #
2458
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#27
2459
+ def build(name, *traits_and_overrides, &block); end
2460
+
2461
+ # (see #strategy_method_list)
2462
+ #
2463
+ # @return [Array] array of built objects defined by the factory
2464
+ #
2465
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#35
2466
+ def build_list(name, amount, *traits_and_overrides, &block); end
2467
+
2468
+ # (see #strategy_method_pair)
2469
+ #
2470
+ # @return [Array] pair of built objects defined by the factory
2471
+ #
2472
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#50
2473
+ def build_pair(name, *traits_and_overrides, &block); end
2474
+
2475
+ # (see #strategy_method)
2476
+ # Builds a stubbed registered factory by name.
2477
+ #
2478
+ # @return [Object] instantiated object defined by the factory
2479
+ #
2480
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#27
2481
+ def build_stubbed(name, *traits_and_overrides, &block); end
2482
+
2483
+ # (see #strategy_method_list)
2484
+ #
2485
+ # @return [Array] array of stubbed objects defined by the factory
2486
+ #
2487
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#35
2488
+ def build_stubbed_list(name, amount, *traits_and_overrides, &block); end
2489
+
2490
+ # (see #strategy_method_pair)
2491
+ #
2492
+ # @return [Array] pair of stubbed objects defined by the factory
2493
+ #
2494
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#50
2495
+ def build_stubbed_pair(name, *traits_and_overrides, &block); end
2496
+
2497
+ # (see #strategy_method)
2498
+ # Creates a registered factory by name.
2499
+ #
2500
+ # @return [Object] instantiated object defined by the factory
2501
+ #
2502
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#27
2503
+ def create(name, *traits_and_overrides, &block); end
2504
+
2505
+ # (see #strategy_method_list)
2506
+ #
2507
+ # @return [Array] array of created objects defined by the factory
2508
+ #
2509
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#35
2510
+ def create_list(name, amount, *traits_and_overrides, &block); end
2511
+
2512
+ # (see #strategy_method_pair)
2513
+ #
2514
+ # @return [Array] pair of created objects defined by the factory
2515
+ #
2516
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#50
2517
+ def create_pair(name, *traits_and_overrides, &block); end
2518
+
2519
+ # Generates and returns the next value in a global or factory sequence.
2520
+ #
2521
+ # Arguments:
2522
+ # context: (Array of Symbols)
2523
+ # The definition context of the sequence, with the sequence name
2524
+ # as the final entry
2525
+ # scope: (object)(optional)
2526
+ # The object the sequence should be evaluated within
2527
+ #
2528
+ # Returns:
2529
+ # The next value in the sequence. (Object)
2530
+ #
2531
+ # Example:
2532
+ # generate(:my_factory, :my_trair, :my_sequence)
2533
+ #
2534
+ # source://factory_bot//lib/factory_bot/syntax/methods.rb#120
2535
+ def generate(*uri_parts, scope: T.unsafe(nil)); end
2536
+
2537
+ # Generates and returns the list of values in a global or factory sequence.
2538
+ #
2539
+ # Arguments:
2540
+ # uri_parts: (Array of Symbols)
2541
+ # The definition context of the sequence, with the sequence name
2542
+ # as the final entry
2543
+ # scope: (object)(optional)
2544
+ # The object the sequence should be evaluated within
2545
+ #
2546
+ # Returns:
2547
+ # The next value in the sequence. (Object)
2548
+ #
2549
+ # Example:
2550
+ # generate_list(:my_factory, :my_trair, :my_sequence, 5)
2551
+ #
2552
+ # source://factory_bot//lib/factory_bot/syntax/methods.rb#144
2553
+ def generate_list(*uri_parts, count, scope: T.unsafe(nil)); end
2554
+
2555
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#27
2556
+ def null(name, *traits_and_overrides, &block); end
2557
+
2558
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#35
2559
+ def null_list(name, amount, *traits_and_overrides, &block); end
2560
+
2561
+ # source://factory_bot//lib/factory_bot/strategy_syntax_method_registrar.rb#50
2562
+ def null_pair(name, *traits_and_overrides, &block); end
2563
+
2564
+ private
2565
+
2566
+ # Increments the given sequence and returns the value.
2567
+ #
2568
+ # Arguments:
2569
+ # sequence:
2570
+ # The sequence instance
2571
+ # scope: (object)(optional)
2572
+ # The object the sequence should be evaluated within
2573
+ #
2574
+ # source://factory_bot//lib/factory_bot/syntax/methods.rb#169
2575
+ def increment_sequence(sequence, scope: T.unsafe(nil)); end
2576
+ end
2577
+
2578
+ # @api private
2579
+ #
2580
+ # source://factory_bot//lib/factory_bot/syntax_runner.rb#3
2581
+ class FactoryBot::SyntaxRunner
2582
+ include ::FactoryBot::Syntax::Methods
2583
+ end
2584
+
2585
+ # @api private
2586
+ #
2587
+ # source://factory_bot//lib/factory_bot/trait.rb#3
2588
+ class FactoryBot::Trait
2589
+ # @api private
2590
+ # @return [Trait] a new instance of Trait
2591
+ #
2592
+ # source://factory_bot//lib/factory_bot/trait.rb#9
2593
+ def initialize(name, **options, &block); end
2594
+
2595
+ # @api private
2596
+ #
2597
+ # source://factory_bot//lib/factory_bot/trait.rb#30
2598
+ def ==(other); end
2599
+
2600
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2601
+ def add_callback(*_arg0, **_arg1, &_arg2); end
2602
+
2603
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2604
+ def attributes(*_arg0, **_arg1, &_arg2); end
2605
+
2606
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2607
+ def callbacks(*_arg0, **_arg1, &_arg2); end
2608
+
2609
+ # @api private
2610
+ #
2611
+ # source://factory_bot//lib/factory_bot/trait.rb#22
2612
+ def clone; end
2613
+
2614
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2615
+ def constructor(*_arg0, **_arg1, &_arg2); end
2616
+
2617
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2618
+ def declare_attribute(*_arg0, **_arg1, &_arg2); end
2619
+
2620
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2621
+ def define_trait(*_arg0, **_arg1, &_arg2); end
2622
+
2623
+ # @api private
2624
+ #
2625
+ # source://factory_bot//lib/factory_bot/trait.rb#4
2626
+ def definition; end
2627
+
2628
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2629
+ def klass(*_arg0, **_arg1, &_arg2); end
2630
+
2631
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2632
+ def klass=(arg); end
2633
+
2634
+ # @api private
2635
+ #
2636
+ # source://factory_bot//lib/factory_bot/trait.rb#4
2637
+ def name; end
2638
+
2639
+ # @api private
2640
+ #
2641
+ # source://factory_bot//lib/factory_bot/trait.rb#26
2642
+ def names; end
2643
+
2644
+ # source://factory_bot//lib/factory_bot/trait.rb#6
2645
+ def to_create(*_arg0, **_arg1, &_arg2); end
2646
+
2647
+ # @api private
2648
+ #
2649
+ # source://factory_bot//lib/factory_bot/trait.rb#4
2650
+ def uid; end
2651
+
2652
+ protected
2653
+
2654
+ # @api private
2655
+ #
2656
+ # source://factory_bot//lib/factory_bot/trait.rb#37
2657
+ def block; end
2658
+ end
2659
+
2660
+ # Raised when a trait is defined that references itself.
2661
+ #
2662
+ # source://factory_bot//lib/factory_bot/errors.rb#6
2663
+ class FactoryBot::TraitDefinitionError < ::RuntimeError; end
2664
+
2665
+ # @api private
2666
+ #
2667
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#3
2668
+ class FactoryBot::UriManager
2669
+ # Configures the new UriManager
2670
+ #
2671
+ # Arguments:
2672
+ # endpoints: (Array of Strings or Symbols)
2673
+ # the objects endpoints.
2674
+ #
2675
+ # paths: (Array of Strings or Symbols)
2676
+ # the parent URIs to prepend to each endpoint
2677
+ #
2678
+ # @api private
2679
+ # @return [UriManager] a new instance of UriManager
2680
+ #
2681
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#35
2682
+ def initialize(*endpoints, paths: T.unsafe(nil)); end
2683
+
2684
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2685
+ def any?(*_arg0, **_arg1, &_arg2); end
2686
+
2687
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#7
2688
+ def build_uri(*_arg0, **_arg1, &_arg2); end
2689
+
2690
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2691
+ def each?(*_arg0, **_arg1, &_arg2); end
2692
+
2693
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2694
+ def empty?(*_arg0, **_arg1, &_arg2); end
2695
+
2696
+ # @api private
2697
+ #
2698
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#4
2699
+ def endpoints; end
2700
+
2701
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2702
+ def first(*_arg0, **_arg1, &_arg2); end
2703
+
2704
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2705
+ def include?(*_arg0, **_arg1, &_arg2); end
2706
+
2707
+ # @api private
2708
+ #
2709
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#4
2710
+ def paths; end
2711
+
2712
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#6
2713
+ def size(*_arg0, **_arg1, &_arg2); end
2714
+
2715
+ # @api private
2716
+ #
2717
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#47
2718
+ def to_a; end
2719
+
2720
+ # @api private
2721
+ #
2722
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#4
2723
+ def uri_list; end
2724
+
2725
+ private
2726
+
2727
+ # @api private
2728
+ #
2729
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#53
2730
+ def build_uri_list; end
2731
+
2732
+ class << self
2733
+ # Concatenate the parts, sripping leading/following slashes
2734
+ # and returning a Symbolized String or nil.
2735
+ #
2736
+ # Example:
2737
+ # build_uri(:my_factory, :my_trait, :my_sequence)
2738
+ # #=> :"myfactory/my_trait/my_sequence"
2739
+ #
2740
+ # @api private
2741
+ #
2742
+ # source://factory_bot//lib/factory_bot/uri_manager.rb#16
2743
+ def build_uri(*parts); end
2744
+ end
2745
+ end
2746
+
2747
+ # source://factory_bot//lib/factory_bot/version.rb#2
2748
+ FactoryBot::VERSION = T.let(T.unsafe(nil), String)