packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,1201 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `activemodel` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module ActiveModel
8
+ extend(::ActiveSupport::Autoload)
9
+
10
+ class << self
11
+ def eager_load!; end
12
+ def gem_version; end
13
+ def version; end
14
+ end
15
+ end
16
+
17
+ class ActiveModel::Attribute
18
+ def initialize(name, value_before_type_cast, type, original_attribute = T.unsafe(nil)); end
19
+
20
+ def ==(other); end
21
+ def came_from_user?; end
22
+ def changed?; end
23
+ def changed_in_place?; end
24
+ def encode_with(coder); end
25
+ def eql?(other); end
26
+ def forgetting_assignment; end
27
+ def has_been_read?; end
28
+ def hash; end
29
+ def init_with(coder); end
30
+ def initialized?; end
31
+ def name; end
32
+ def original_value; end
33
+ def type; end
34
+ def type_cast(*_); end
35
+ def value; end
36
+ def value_before_type_cast; end
37
+ def value_for_database; end
38
+ def with_cast_value(value); end
39
+ def with_type(type); end
40
+ def with_value_from_database(value); end
41
+ def with_value_from_user(value); end
42
+
43
+ protected
44
+
45
+ def original_value_for_database; end
46
+
47
+ private
48
+
49
+ def _original_value_for_database; end
50
+ def assigned?; end
51
+ def changed_from_assignment?; end
52
+ def initialize_dup(other); end
53
+ def original_attribute; end
54
+
55
+ class << self
56
+ def from_database(name, value, type); end
57
+ def from_user(name, value, type, original_attribute = T.unsafe(nil)); end
58
+ def null(name); end
59
+ def uninitialized(name, type); end
60
+ def with_cast_value(name, value, type); end
61
+ end
62
+ end
63
+
64
+ class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute
65
+ def initialize(name, value, type, database_default); end
66
+
67
+ def marshal_dump; end
68
+ def marshal_load(values); end
69
+ def value_before_type_cast; end
70
+ def with_type(type); end
71
+
72
+ private
73
+
74
+ def user_provided_value; end
75
+ end
76
+
77
+ module ActiveModel::AttributeAssignment
78
+ include(::ActiveModel::ForbiddenAttributesProtection)
79
+
80
+ def assign_attributes(new_attributes); end
81
+ def attributes=(new_attributes); end
82
+
83
+ private
84
+
85
+ def _assign_attribute(k, v); end
86
+ def _assign_attributes(attributes); end
87
+ end
88
+
89
+ module ActiveModel::AttributeMethods
90
+ extend(::ActiveSupport::Concern)
91
+
92
+ mixes_in_class_methods(::ActiveModel::AttributeMethods::ClassMethods)
93
+
94
+ def attribute_missing(match, *args, &block); end
95
+ def method_missing(method, *args, &block); end
96
+ def respond_to?(method, include_private_methods = T.unsafe(nil)); end
97
+ def respond_to_without_attributes?(*_); end
98
+
99
+ private
100
+
101
+ def _read_attribute(attr); end
102
+ def attribute_method?(attr_name); end
103
+ def matched_attribute_method(method_name); end
104
+ def missing_attribute(attr_name, stack); end
105
+ end
106
+
107
+ module ActiveModel::AttributeMethods::AttrNames
108
+ class << self
109
+ def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end
110
+ end
111
+ end
112
+
113
+ ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp)
114
+
115
+ ActiveModel::AttributeMethods::CALL_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp)
116
+
117
+ module ActiveModel::AttributeMethods::ClassMethods
118
+ def alias_attribute(new_name, old_name); end
119
+ def attribute_alias(name); end
120
+ def attribute_alias?(new_name); end
121
+ def attribute_method_affix(*affixes); end
122
+ def attribute_method_prefix(*prefixes); end
123
+ def attribute_method_suffix(*suffixes); end
124
+ def define_attribute_method(attr_name, _owner: T.unsafe(nil)); end
125
+ def define_attribute_methods(*attr_names); end
126
+ def undefine_attribute_methods; end
127
+
128
+ private
129
+
130
+ def attribute_method_matchers_cache; end
131
+ def attribute_method_matchers_matching(method_name); end
132
+ def define_proxy_call(include_private, code_generator, name, target, *extra); end
133
+ def generated_attribute_methods; end
134
+ def instance_method_already_implemented?(method_name); end
135
+ end
136
+
137
+ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher
138
+ def initialize(options = T.unsafe(nil)); end
139
+
140
+ def match(method_name); end
141
+ def method_name(attr_name); end
142
+ def prefix; end
143
+ def suffix; end
144
+ def target; end
145
+ end
146
+
147
+ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::AttributeMethodMatch < ::Struct
148
+ def attr_name; end
149
+ def attr_name=(_); end
150
+ def target; end
151
+ def target=(_); end
152
+
153
+ class << self
154
+ def [](*_); end
155
+ def inspect; end
156
+ def members; end
157
+ def new(*_); end
158
+ end
159
+ end
160
+
161
+ ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp)
162
+
163
+ class ActiveModel::AttributeMutationTracker
164
+ def initialize(attributes, forced_changes = T.unsafe(nil)); end
165
+
166
+ def any_changes?; end
167
+ def change_to_attribute(attr_name); end
168
+ def changed?(attr_name, from: T.unsafe(nil), to: T.unsafe(nil)); end
169
+ def changed_attribute_names; end
170
+ def changed_in_place?(attr_name); end
171
+ def changed_values; end
172
+ def changes; end
173
+ def force_change(attr_name); end
174
+ def forget_change(attr_name); end
175
+ def original_value(attr_name); end
176
+
177
+ private
178
+
179
+ def attr_names; end
180
+ def attribute_changed?(attr_name); end
181
+ def attributes; end
182
+ def fetch_value(attr_name); end
183
+ def forced_changes; end
184
+ end
185
+
186
+ ActiveModel::AttributeMutationTracker::OPTION_NOT_GIVEN = T.let(T.unsafe(nil), Object)
187
+
188
+ class ActiveModel::AttributeSet
189
+ def initialize(attributes); end
190
+
191
+ def ==(other); end
192
+ def [](name); end
193
+ def []=(name, value); end
194
+ def accessed; end
195
+ def deep_dup; end
196
+ def each_value(*args, &block); end
197
+ def except(*args, &block); end
198
+ def fetch(*args, &block); end
199
+ def fetch_value(name, &block); end
200
+ def freeze; end
201
+ def key?(name); end
202
+ def keys; end
203
+ def map(&block); end
204
+ def reset(key); end
205
+ def to_h; end
206
+ def to_hash; end
207
+ def values_before_type_cast; end
208
+ def write_cast_value(name, value); end
209
+ def write_from_database(name, value); end
210
+ def write_from_user(name, value); end
211
+
212
+ protected
213
+
214
+ def attributes; end
215
+
216
+ private
217
+
218
+ def initialize_clone(_); end
219
+ def initialize_dup(_); end
220
+ def initialized_attributes; end
221
+ end
222
+
223
+ class ActiveModel::AttributeSet::Builder
224
+ def initialize(types, default_attributes = T.unsafe(nil)); end
225
+
226
+ def build_from_database(values = T.unsafe(nil), additional_types = T.unsafe(nil)); end
227
+ def default_attributes; end
228
+ def types; end
229
+ end
230
+
231
+ class ActiveModel::AttributeSet::YAMLEncoder
232
+ def initialize(default_types); end
233
+
234
+ def decode(coder); end
235
+ def encode(attribute_set, coder); end
236
+
237
+ private
238
+
239
+ def default_types; end
240
+ end
241
+
242
+ module ActiveModel::Attributes
243
+ extend(::ActiveSupport::Concern)
244
+
245
+ include(::ActiveModel::AttributeMethods)
246
+
247
+ mixes_in_class_methods(::ActiveModel::Attributes::ClassMethods)
248
+
249
+ def initialize(*_); end
250
+
251
+ def attribute_names; end
252
+ def attributes; end
253
+ def freeze; end
254
+
255
+ private
256
+
257
+ def attribute(attr_name); end
258
+ def attribute=(attribute_name, value); end
259
+ def initialize_dup(other); end
260
+ def write_attribute(attr_name, value); end
261
+ end
262
+
263
+ module ActiveModel::Attributes::ClassMethods
264
+ def attribute(name, type = T.unsafe(nil), **options); end
265
+ def attribute_names; end
266
+
267
+ private
268
+
269
+ def define_default_attribute(name, value, type); end
270
+ def define_method_attribute=(name, owner:); end
271
+ end
272
+
273
+ class ActiveModel::BlockValidator < ::ActiveModel::EachValidator
274
+ def initialize(options, &block); end
275
+
276
+
277
+ private
278
+
279
+ def validate_each(record, attribute, value); end
280
+ end
281
+
282
+ module ActiveModel::Callbacks
283
+ def define_model_callbacks(*callbacks); end
284
+
285
+ private
286
+
287
+ def _define_after_model_callback(klass, callback); end
288
+ def _define_around_model_callback(klass, callback); end
289
+ def _define_before_model_callback(klass, callback); end
290
+
291
+ class << self
292
+ def extended(base); end
293
+ end
294
+ end
295
+
296
+ module ActiveModel::Conversion
297
+ extend(::ActiveSupport::Concern)
298
+
299
+ mixes_in_class_methods(::ActiveModel::Conversion::ClassMethods)
300
+
301
+ def to_key; end
302
+ def to_model; end
303
+ def to_param; end
304
+ def to_partial_path; end
305
+ end
306
+
307
+ module ActiveModel::Conversion::ClassMethods
308
+ def _to_partial_path; end
309
+ end
310
+
311
+ class ActiveModel::DeprecationHandlingDetailsHash < ::SimpleDelegator
312
+ def initialize(details); end
313
+ end
314
+
315
+ class ActiveModel::DeprecationHandlingMessageArray < ::SimpleDelegator
316
+ def initialize(content, errors, attribute); end
317
+
318
+ def <<(message); end
319
+ def clear; end
320
+ end
321
+
322
+ class ActiveModel::DeprecationHandlingMessageHash < ::SimpleDelegator
323
+ def initialize(errors); end
324
+
325
+ def []=(attribute, value); end
326
+ def delete(attribute); end
327
+
328
+ private
329
+
330
+ def prepare_content; end
331
+ end
332
+
333
+ module ActiveModel::Dirty
334
+ extend(::ActiveSupport::Concern)
335
+
336
+ include(::ActiveModel::AttributeMethods)
337
+
338
+ def attribute_changed?(attr_name, **options); end
339
+ def attribute_changed_in_place?(attr_name); end
340
+ def attribute_previously_changed?(attr_name, **options); end
341
+ def attribute_previously_was(attr_name); end
342
+ def attribute_was(attr_name); end
343
+ def changed; end
344
+ def changed?; end
345
+ def changed_attributes; end
346
+ def changes; end
347
+ def changes_applied; end
348
+ def clear_attribute_changes(attr_names); end
349
+ def clear_changes_information; end
350
+ def previous_changes; end
351
+ def restore_attributes(attr_names = T.unsafe(nil)); end
352
+
353
+ private
354
+
355
+ def attribute_change(attr_name); end
356
+ def attribute_previous_change(attr_name); end
357
+ def attribute_will_change!(attr_name); end
358
+ def clear_attribute_change(attr_name); end
359
+ def forget_attribute_assignments; end
360
+ def initialize_dup(other); end
361
+ def mutations_before_last_save; end
362
+ def mutations_from_database; end
363
+ def restore_attribute!(attr_name); end
364
+ end
365
+
366
+ class ActiveModel::EachValidator < ::ActiveModel::Validator
367
+ def initialize(options); end
368
+
369
+ def attributes; end
370
+ def check_validity!; end
371
+ def validate(record); end
372
+ def validate_each(record, attribute, value); end
373
+ end
374
+
375
+ class ActiveModel::Error
376
+ def initialize(base, attribute, type = T.unsafe(nil), **options); end
377
+
378
+ def ==(other); end
379
+ def attribute; end
380
+ def base; end
381
+ def detail; end
382
+ def eql?(other); end
383
+ def full_message; end
384
+ def hash; end
385
+ def i18n_customize_full_message; end
386
+ def i18n_customize_full_message=(_); end
387
+ def i18n_customize_full_message?; end
388
+ def inspect; end
389
+ def match?(attribute, type = T.unsafe(nil), **options); end
390
+ def message; end
391
+ def options; end
392
+ def raw_type; end
393
+ def strict_match?(attribute, type, **options); end
394
+ def type; end
395
+
396
+ protected
397
+
398
+ def attributes_for_hash; end
399
+
400
+ private
401
+
402
+ def initialize_dup(other); end
403
+
404
+ class << self
405
+ def full_message(attribute, message, base_class); end
406
+ def generate_message(attribute, type, base, options); end
407
+ def i18n_customize_full_message; end
408
+ def i18n_customize_full_message=(value); end
409
+ def i18n_customize_full_message?; end
410
+ end
411
+ end
412
+
413
+ ActiveModel::Error::CALLBACKS_OPTIONS = T.let(T.unsafe(nil), Array)
414
+
415
+ ActiveModel::Error::MESSAGE_OPTIONS = T.let(T.unsafe(nil), Array)
416
+
417
+ class ActiveModel::Errors
418
+ include(::Enumerable)
419
+ extend(::Forwardable)
420
+
421
+ def initialize(base); end
422
+
423
+ def [](attribute); end
424
+ def add(attribute, type = T.unsafe(nil), **options); end
425
+ def added?(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end
426
+ def any?(*args, &block); end
427
+ def as_json(options = T.unsafe(nil)); end
428
+ def attribute_names; end
429
+ def blank?(*args, &block); end
430
+ def clear(*args, &block); end
431
+ def copy!(other); end
432
+ def count(*args, &block); end
433
+ def delete(attribute, type = T.unsafe(nil), **options); end
434
+ def details; end
435
+ def each(&block); end
436
+ def empty?(*args, &block); end
437
+ def errors; end
438
+ def full_message(attribute, message); end
439
+ def full_messages; end
440
+ def full_messages_for(attribute); end
441
+ def generate_message(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end
442
+ def group_by_attribute; end
443
+ def has_key?(attribute); end
444
+ def import(error, override_options = T.unsafe(nil)); end
445
+ def include?(attribute); end
446
+ def init_with(coder); end
447
+ def key?(attribute); end
448
+ def keys; end
449
+ def marshal_load(array); end
450
+ def merge!(other); end
451
+ def messages; end
452
+ def messages_for(attribute); end
453
+ def objects; end
454
+ def of_kind?(attribute, type = T.unsafe(nil)); end
455
+ def size(*args, &block); end
456
+ def slice!(*keys); end
457
+ def to_a; end
458
+ def to_h; end
459
+ def to_hash(full_messages = T.unsafe(nil)); end
460
+ def to_xml(options = T.unsafe(nil)); end
461
+ def uniq!(*args, &block); end
462
+ def values; end
463
+ def where(attribute, type = T.unsafe(nil), **options); end
464
+
465
+ private
466
+
467
+ def add_from_legacy_details_hash(details); end
468
+ def deprecation_removal_warning(method_name, alternative_message = T.unsafe(nil)); end
469
+ def deprecation_rename_warning(old_method_name, new_method_name); end
470
+ def initialize_dup(other); end
471
+ def normalize_arguments(attribute, type, **options); end
472
+ end
473
+
474
+ class ActiveModel::ForbiddenAttributesError < ::StandardError
475
+ end
476
+
477
+ module ActiveModel::ForbiddenAttributesProtection
478
+
479
+ private
480
+
481
+ def sanitize_for_mass_assignment(attributes); end
482
+ def sanitize_forbidden_attributes(attributes); end
483
+ end
484
+
485
+ class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTracker
486
+ def initialize(attributes, forced_changes = T.unsafe(nil)); end
487
+
488
+ def change_to_attribute(attr_name); end
489
+ def changed_in_place?(attr_name); end
490
+ def finalize_changes; end
491
+ def force_change(attr_name); end
492
+ def forget_change(attr_name); end
493
+ def original_value(attr_name); end
494
+
495
+ private
496
+
497
+ def attr_names; end
498
+ def attribute_changed?(attr_name); end
499
+ def clone_value(attr_name); end
500
+ def fetch_value(attr_name); end
501
+ def finalized_changes; end
502
+ end
503
+
504
+ class ActiveModel::LazyAttributeHash
505
+ def initialize(types, values, additional_types, default_attributes, delegate_hash = T.unsafe(nil)); end
506
+
507
+ def ==(other); end
508
+ def [](key); end
509
+ def []=(key, value); end
510
+ def deep_dup; end
511
+ def each_key(*args, &block); end
512
+ def each_value(*args, &block); end
513
+ def except(*args, &block); end
514
+ def fetch(*args, &block); end
515
+ def key?(key); end
516
+ def marshal_dump; end
517
+ def marshal_load(values); end
518
+ def select; end
519
+ def transform_values(*args, &block); end
520
+
521
+ protected
522
+
523
+ def materialize; end
524
+
525
+ private
526
+
527
+ def additional_types; end
528
+ def assign_default_value(name); end
529
+ def default_attributes; end
530
+ def delegate_hash; end
531
+ def initialize_dup(_); end
532
+ def types; end
533
+ def values; end
534
+ end
535
+
536
+ module ActiveModel::Lint
537
+ end
538
+
539
+ module ActiveModel::Lint::Tests
540
+ def test_errors_aref; end
541
+ def test_model_naming; end
542
+ def test_persisted?; end
543
+ def test_to_key; end
544
+ def test_to_param; end
545
+ def test_to_partial_path; end
546
+
547
+ private
548
+
549
+ def assert_boolean(result, name); end
550
+ def model; end
551
+ end
552
+
553
+ class ActiveModel::MissingAttributeError < ::NoMethodError
554
+ end
555
+
556
+ module ActiveModel::Model
557
+ include(::ActiveModel::ForbiddenAttributesProtection)
558
+ include(::ActiveModel::AttributeAssignment)
559
+ extend(::ActiveSupport::Concern)
560
+
561
+ include(::ActiveSupport::Callbacks)
562
+ include(::ActiveModel::Validations::HelperMethods)
563
+ include(::ActiveModel::Validations)
564
+ include(::ActiveModel::Conversion)
565
+
566
+ def initialize(attributes = T.unsafe(nil)); end
567
+
568
+ def persisted?; end
569
+ end
570
+
571
+ class ActiveModel::Name
572
+ include(::Comparable)
573
+
574
+ def initialize(klass, namespace = T.unsafe(nil), name = T.unsafe(nil)); end
575
+
576
+ def !~(*args, &block); end
577
+ def <=>(*args, &block); end
578
+ def ==(arg); end
579
+ def ===(arg); end
580
+ def =~(*args, &block); end
581
+ def as_json(*args, &block); end
582
+ def cache_key; end
583
+ def collection; end
584
+ def element; end
585
+ def eql?(*args, &block); end
586
+ def human(options = T.unsafe(nil)); end
587
+ def i18n_key; end
588
+ def match?(*args, &block); end
589
+ def name; end
590
+ def param_key; end
591
+ def plural; end
592
+ def route_key; end
593
+ def singular; end
594
+ def singular_route_key; end
595
+ def to_s(*args, &block); end
596
+ def to_str(*args, &block); end
597
+
598
+ private
599
+
600
+ def _singularize(string); end
601
+ end
602
+
603
+ module ActiveModel::Naming
604
+ def model_name; end
605
+
606
+ class << self
607
+ def extended(base); end
608
+ def param_key(record_or_class); end
609
+ def plural(record_or_class); end
610
+ def route_key(record_or_class); end
611
+ def singular(record_or_class); end
612
+ def singular_route_key(record_or_class); end
613
+ def uncountable?(record_or_class); end
614
+
615
+ private
616
+
617
+ def model_name_from_record_or_class(record_or_class); end
618
+ end
619
+ end
620
+
621
+ class ActiveModel::NestedError < ::ActiveModel::Error
622
+ extend(::Forwardable)
623
+
624
+ def initialize(base, inner_error, override_options = T.unsafe(nil)); end
625
+
626
+ def inner_error; end
627
+ def message(*args, &block); end
628
+ end
629
+
630
+ class ActiveModel::NullMutationTracker
631
+ include(::Singleton)
632
+ extend(::Singleton::SingletonClassMethods)
633
+
634
+ def any_changes?; end
635
+ def change_to_attribute(attr_name); end
636
+ def changed?(attr_name, **_); end
637
+ def changed_attribute_names; end
638
+ def changed_in_place?(attr_name); end
639
+ def changed_values; end
640
+ def changes; end
641
+ def original_value(attr_name); end
642
+
643
+ class << self
644
+ def instance; end
645
+ end
646
+ end
647
+
648
+ class ActiveModel::Railtie < ::Rails::Railtie
649
+ end
650
+
651
+ class ActiveModel::RangeError < ::RangeError
652
+ end
653
+
654
+ module ActiveModel::SecurePassword
655
+ extend(::ActiveSupport::Concern)
656
+
657
+ mixes_in_class_methods(::ActiveModel::SecurePassword::ClassMethods)
658
+
659
+ class << self
660
+ def min_cost; end
661
+ def min_cost=(_); end
662
+ end
663
+ end
664
+
665
+ module ActiveModel::SecurePassword::ClassMethods
666
+ def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil)); end
667
+ end
668
+
669
+ class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module
670
+ def initialize(attribute); end
671
+ end
672
+
673
+ ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), Integer)
674
+
675
+ module ActiveModel::Serialization
676
+ def read_attribute_for_serialization(*_); end
677
+ def serializable_hash(options = T.unsafe(nil)); end
678
+
679
+ private
680
+
681
+ def serializable_add_includes(options = T.unsafe(nil)); end
682
+ end
683
+
684
+ module ActiveModel::Serializers
685
+ extend(::ActiveSupport::Autoload)
686
+ end
687
+
688
+ module ActiveModel::Serializers::JSON
689
+ include(::ActiveModel::Serialization)
690
+ extend(::ActiveSupport::Concern)
691
+
692
+ mixes_in_class_methods(::ActiveModel::Naming)
693
+
694
+ def as_json(options = T.unsafe(nil)); end
695
+ def from_json(json, include_root = T.unsafe(nil)); end
696
+ end
697
+
698
+ class ActiveModel::StrictValidationFailed < ::StandardError
699
+ end
700
+
701
+ module ActiveModel::Translation
702
+ include(::ActiveModel::Naming)
703
+
704
+ def human_attribute_name(attribute, options = T.unsafe(nil)); end
705
+ def i18n_scope; end
706
+ def lookup_ancestors; end
707
+ end
708
+
709
+ module ActiveModel::Type
710
+ class << self
711
+ def default_value; end
712
+ def lookup(*args, **kwargs); end
713
+ def register(type_name, klass = T.unsafe(nil), **options, &block); end
714
+ def registry; end
715
+ def registry=(_); end
716
+ end
717
+ end
718
+
719
+ class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer
720
+
721
+ private
722
+
723
+ def max_value; end
724
+ end
725
+
726
+ class ActiveModel::Type::Binary < ::ActiveModel::Type::Value
727
+ def binary?; end
728
+ def cast(value); end
729
+ def changed_in_place?(raw_old_value, value); end
730
+ def serialize(value); end
731
+ def type; end
732
+ end
733
+
734
+ class ActiveModel::Type::Binary::Data
735
+ def initialize(value); end
736
+
737
+ def ==(other); end
738
+ def hex; end
739
+ def to_s; end
740
+ def to_str; end
741
+ end
742
+
743
+ class ActiveModel::Type::Boolean < ::ActiveModel::Type::Value
744
+ def serialize(value); end
745
+ def type; end
746
+
747
+ private
748
+
749
+ def cast_value(value); end
750
+ end
751
+
752
+ ActiveModel::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Set)
753
+
754
+ class ActiveModel::Type::Date < ::ActiveModel::Type::Value
755
+ include(::ActiveModel::Type::Helpers::Timezone)
756
+
757
+ def type; end
758
+ def type_cast_for_schema(value); end
759
+
760
+ private
761
+
762
+ def cast_value(value); end
763
+ def fallback_string_to_date(string); end
764
+ def fast_string_to_date(string); end
765
+ def new_date(year, mon, mday); end
766
+ def value_from_multiparameter_assignment(*_); end
767
+ end
768
+
769
+ ActiveModel::Type::Date::ISO_DATE = T.let(T.unsafe(nil), Regexp)
770
+
771
+ class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value
772
+ include(::ActiveModel::Type::Helpers::Timezone)
773
+ include(::ActiveModel::Type::Helpers::TimeValue)
774
+
775
+ def type; end
776
+
777
+ private
778
+
779
+ def cast_value(value); end
780
+ def fallback_string_to_time(string); end
781
+ def microseconds(time); end
782
+ def value_from_multiparameter_assignment(values_hash); end
783
+ end
784
+
785
+ class ActiveModel::Type::Decimal < ::ActiveModel::Type::Value
786
+ include(::ActiveModel::Type::Helpers::Numeric)
787
+
788
+ def type; end
789
+ def type_cast_for_schema(value); end
790
+
791
+ private
792
+
793
+ def apply_scale(value); end
794
+ def cast_value(value); end
795
+ def convert_float_to_big_decimal(value); end
796
+ def float_precision; end
797
+ end
798
+
799
+ ActiveModel::Type::Decimal::BIGDECIMAL_PRECISION = T.let(T.unsafe(nil), Integer)
800
+
801
+ class ActiveModel::Type::Float < ::ActiveModel::Type::Value
802
+ include(::ActiveModel::Type::Helpers::Numeric)
803
+
804
+ def type; end
805
+ def type_cast_for_schema(value); end
806
+
807
+ private
808
+
809
+ def cast_value(value); end
810
+ end
811
+
812
+ module ActiveModel::Type::Helpers
813
+ end
814
+
815
+ class ActiveModel::Type::Helpers::AcceptsMultiparameterTime < ::Module
816
+ def initialize(defaults: T.unsafe(nil)); end
817
+ end
818
+
819
+ module ActiveModel::Type::Helpers::Mutable
820
+ def cast(value); end
821
+ def changed_in_place?(raw_old_value, new_value); end
822
+ end
823
+
824
+ module ActiveModel::Type::Helpers::Numeric
825
+ def cast(value); end
826
+ def changed?(old_value, _new_value, new_value_before_type_cast); end
827
+ def serialize(value); end
828
+ def unchecked_serialize(value); end
829
+
830
+ private
831
+
832
+ def non_numeric_string?(value); end
833
+ def number_to_non_number?(old_value, new_value_before_type_cast); end
834
+ end
835
+
836
+ module ActiveModel::Type::Helpers::TimeValue
837
+ def apply_seconds_precision(value); end
838
+ def serialize(value); end
839
+ def type_cast_for_schema(value); end
840
+ def user_input_in_time_zone(value); end
841
+
842
+ private
843
+
844
+ def fast_string_to_time(string); end
845
+ def new_time(year, mon, mday, hour, min, sec, microsec, offset = T.unsafe(nil)); end
846
+ end
847
+
848
+ ActiveModel::Type::Helpers::TimeValue::ISO_DATETIME = T.let(T.unsafe(nil), Regexp)
849
+
850
+ module ActiveModel::Type::Helpers::Timezone
851
+ def default_timezone; end
852
+ def is_utc?; end
853
+ end
854
+
855
+ class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value
856
+ def serialize(value); end
857
+ def type; end
858
+
859
+ private
860
+
861
+ def cast_value(value); end
862
+ end
863
+
864
+ class ActiveModel::Type::Integer < ::ActiveModel::Type::Value
865
+ include(::ActiveModel::Type::Helpers::Numeric)
866
+
867
+ def initialize(**_); end
868
+
869
+ def deserialize(value); end
870
+ def serializable?(value); end
871
+ def serialize(value); end
872
+ def type; end
873
+
874
+ private
875
+
876
+ def _limit; end
877
+ def cast_value(value); end
878
+ def ensure_in_range(value); end
879
+ def in_range?(value); end
880
+ def max_value; end
881
+ def min_value; end
882
+ def range; end
883
+ end
884
+
885
+ ActiveModel::Type::Integer::DEFAULT_LIMIT = T.let(T.unsafe(nil), Integer)
886
+
887
+ class ActiveModel::Type::Registration
888
+ def initialize(name, block, **_); end
889
+
890
+ def call(_registry, *args, **kwargs); end
891
+ def matches?(type_name, *args, **kwargs); end
892
+
893
+ private
894
+
895
+ def block; end
896
+ def name; end
897
+ end
898
+
899
+ class ActiveModel::Type::Registry
900
+ def initialize; end
901
+
902
+ def lookup(symbol, *args, **kwargs); end
903
+ def register(type_name, klass = T.unsafe(nil), **options, &block); end
904
+
905
+ private
906
+
907
+ def find_registration(symbol, *args, **kwargs); end
908
+ def registration_klass; end
909
+ def registrations; end
910
+ end
911
+
912
+ class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString
913
+ def changed_in_place?(raw_old_value, new_value); end
914
+
915
+ private
916
+
917
+ def cast_value(value); end
918
+ end
919
+
920
+ class ActiveModel::Type::Time < ::ActiveModel::Type::Value
921
+ include(::ActiveModel::Type::Helpers::Timezone)
922
+ include(::ActiveModel::Type::Helpers::TimeValue)
923
+
924
+ def type; end
925
+ def user_input_in_time_zone(value); end
926
+
927
+ private
928
+
929
+ def cast_value(value); end
930
+ end
931
+
932
+ class ActiveModel::Type::Value
933
+ def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end
934
+
935
+ def ==(other); end
936
+ def assert_valid_value(_); end
937
+ def binary?; end
938
+ def cast(value); end
939
+ def changed?(old_value, new_value, _new_value_before_type_cast); end
940
+ def changed_in_place?(raw_old_value, new_value); end
941
+ def deserialize(value); end
942
+ def eql?(other); end
943
+ def force_equality?(_value); end
944
+ def hash; end
945
+ def limit; end
946
+ def map(value); end
947
+ def precision; end
948
+ def scale; end
949
+ def serializable?(value); end
950
+ def serialize(value); end
951
+ def type; end
952
+ def type_cast_for_schema(value); end
953
+ def unchecked_serialize(value); end
954
+ def value_constructed_by_mass_assignment?(_value); end
955
+
956
+ private
957
+
958
+ def cast_value(value); end
959
+ end
960
+
961
+ class ActiveModel::UnknownAttributeError < ::NoMethodError
962
+ def initialize(record, attribute); end
963
+
964
+ def attribute; end
965
+ def record; end
966
+ end
967
+
968
+ module ActiveModel::VERSION
969
+ end
970
+
971
+ ActiveModel::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
972
+
973
+ ActiveModel::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
974
+
975
+ ActiveModel::VERSION::PRE = T.let(T.unsafe(nil), String)
976
+
977
+ ActiveModel::VERSION::STRING = T.let(T.unsafe(nil), String)
978
+
979
+ ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer)
980
+
981
+ class ActiveModel::ValidationError < ::StandardError
982
+ def initialize(model); end
983
+
984
+ def model; end
985
+ end
986
+
987
+ module ActiveModel::Validations
988
+ extend(::ActiveSupport::Concern)
989
+
990
+ include(::ActiveSupport::Callbacks)
991
+ include(::ActiveModel::Validations::HelperMethods)
992
+
993
+ mixes_in_class_methods(::ActiveModel::Validations::ClassMethods)
994
+
995
+ def errors; end
996
+ def invalid?(context = T.unsafe(nil)); end
997
+ def read_attribute_for_validation(*_); end
998
+ def valid?(context = T.unsafe(nil)); end
999
+ def validate(context = T.unsafe(nil)); end
1000
+ def validate!(context = T.unsafe(nil)); end
1001
+ def validates_with(*args, &block); end
1002
+
1003
+ private
1004
+
1005
+ def initialize_dup(other); end
1006
+ def raise_validation_error; end
1007
+ def run_validations!; end
1008
+ end
1009
+
1010
+ class ActiveModel::Validations::AbsenceValidator < ::ActiveModel::EachValidator
1011
+ def validate_each(record, attr_name, value); end
1012
+ end
1013
+
1014
+ class ActiveModel::Validations::AcceptanceValidator < ::ActiveModel::EachValidator
1015
+ def initialize(options); end
1016
+
1017
+ def validate_each(record, attribute, value); end
1018
+
1019
+ private
1020
+
1021
+ def acceptable_option?(value); end
1022
+ def setup!(klass); end
1023
+ end
1024
+
1025
+ class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < ::Module
1026
+ def initialize(attributes); end
1027
+
1028
+ def ==(other); end
1029
+ def define_on(klass); end
1030
+ def included(klass); end
1031
+ def matches?(method_name); end
1032
+
1033
+ protected
1034
+
1035
+ def attributes; end
1036
+ end
1037
+
1038
+ module ActiveModel::Validations::Callbacks
1039
+ extend(::ActiveSupport::Concern)
1040
+
1041
+ include(::ActiveSupport::Callbacks)
1042
+
1043
+ mixes_in_class_methods(::ActiveModel::Validations::Callbacks::ClassMethods)
1044
+
1045
+
1046
+ private
1047
+
1048
+ def run_validations!; end
1049
+ end
1050
+
1051
+ module ActiveModel::Validations::Callbacks::ClassMethods
1052
+ def after_validation(*args, &block); end
1053
+ def before_validation(*args, &block); end
1054
+ end
1055
+
1056
+ module ActiveModel::Validations::ClassMethods
1057
+ def attribute_method?(attribute); end
1058
+ def clear_validators!; end
1059
+ def inherited(base); end
1060
+ def validate(*args, &block); end
1061
+ def validates(*attributes); end
1062
+ def validates!(*attributes); end
1063
+ def validates_each(*attr_names, &block); end
1064
+ def validates_with(*args, &block); end
1065
+ def validators; end
1066
+ def validators_on(*attributes); end
1067
+
1068
+ private
1069
+
1070
+ def _parse_validates_options(options); end
1071
+ def _validates_default_keys; end
1072
+ end
1073
+
1074
+ ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array)
1075
+
1076
+ module ActiveModel::Validations::Clusivity
1077
+ def check_validity!; end
1078
+
1079
+ private
1080
+
1081
+ def delimiter; end
1082
+ def include?(record, value); end
1083
+ def inclusion_method(enumerable); end
1084
+ end
1085
+
1086
+ ActiveModel::Validations::Clusivity::ERROR_MESSAGE = T.let(T.unsafe(nil), String)
1087
+
1088
+ class ActiveModel::Validations::ConfirmationValidator < ::ActiveModel::EachValidator
1089
+ def initialize(options); end
1090
+
1091
+ def validate_each(record, attribute, value); end
1092
+
1093
+ private
1094
+
1095
+ def confirmation_value_equal?(record, attribute, value, confirmed); end
1096
+ def setup!(klass); end
1097
+ end
1098
+
1099
+ class ActiveModel::Validations::ExclusionValidator < ::ActiveModel::EachValidator
1100
+ include(::ActiveModel::Validations::Clusivity)
1101
+
1102
+ def validate_each(record, attribute, value); end
1103
+ end
1104
+
1105
+ class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator
1106
+ def check_validity!; end
1107
+ def validate_each(record, attribute, value); end
1108
+
1109
+ private
1110
+
1111
+ def check_options_validity(name); end
1112
+ def option_call(record, name); end
1113
+ def record_error(record, attribute, name, value); end
1114
+ def regexp_using_multiline_anchors?(regexp); end
1115
+ end
1116
+
1117
+ module ActiveModel::Validations::HelperMethods
1118
+ def validates_absence_of(*attr_names); end
1119
+ def validates_acceptance_of(*attr_names); end
1120
+ def validates_confirmation_of(*attr_names); end
1121
+ def validates_exclusion_of(*attr_names); end
1122
+ def validates_format_of(*attr_names); end
1123
+ def validates_inclusion_of(*attr_names); end
1124
+ def validates_length_of(*attr_names); end
1125
+ def validates_numericality_of(*attr_names); end
1126
+ def validates_presence_of(*attr_names); end
1127
+ def validates_size_of(*attr_names); end
1128
+
1129
+ private
1130
+
1131
+ def _merge_attributes(attr_names); end
1132
+ end
1133
+
1134
+ class ActiveModel::Validations::InclusionValidator < ::ActiveModel::EachValidator
1135
+ include(::ActiveModel::Validations::Clusivity)
1136
+
1137
+ def validate_each(record, attribute, value); end
1138
+ end
1139
+
1140
+ class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator
1141
+ def initialize(options); end
1142
+
1143
+ def check_validity!; end
1144
+ def validate_each(record, attribute, value); end
1145
+
1146
+ private
1147
+
1148
+ def skip_nil_check?(key); end
1149
+ end
1150
+
1151
+ ActiveModel::Validations::LengthValidator::CHECKS = T.let(T.unsafe(nil), Hash)
1152
+
1153
+ ActiveModel::Validations::LengthValidator::MESSAGES = T.let(T.unsafe(nil), Hash)
1154
+
1155
+ ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array)
1156
+
1157
+ class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValidator
1158
+ def check_validity!; end
1159
+ def validate_each(record, attr_name, value, precision: T.unsafe(nil), scale: T.unsafe(nil)); end
1160
+
1161
+ private
1162
+
1163
+ def allow_only_integer?(record); end
1164
+ def filtered_options(value); end
1165
+ def is_hexadecimal_literal?(raw_value); end
1166
+ def is_integer?(raw_value); end
1167
+ def is_number?(raw_value, precision, scale); end
1168
+ def parse_as_number(raw_value, precision, scale); end
1169
+ def parse_float(raw_value, precision, scale); end
1170
+ def record_attribute_changed_in_place?(record, attr_name); end
1171
+ end
1172
+
1173
+ ActiveModel::Validations::NumericalityValidator::CHECKS = T.let(T.unsafe(nil), Hash)
1174
+
1175
+ ActiveModel::Validations::NumericalityValidator::HEXADECIMAL_REGEX = T.let(T.unsafe(nil), Regexp)
1176
+
1177
+ ActiveModel::Validations::NumericalityValidator::INTEGER_REGEX = T.let(T.unsafe(nil), Regexp)
1178
+
1179
+ ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array)
1180
+
1181
+ class ActiveModel::Validations::PresenceValidator < ::ActiveModel::EachValidator
1182
+ def validate_each(record, attr_name, value); end
1183
+ end
1184
+
1185
+ class ActiveModel::Validations::WithValidator < ::ActiveModel::EachValidator
1186
+ def validate_each(record, attr, val); end
1187
+ end
1188
+
1189
+ class ActiveModel::Validator
1190
+ def initialize(options = T.unsafe(nil)); end
1191
+
1192
+ def kind; end
1193
+ def options; end
1194
+ def validate(record); end
1195
+
1196
+ class << self
1197
+ def kind; end
1198
+ end
1199
+ end
1200
+
1201
+ ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.unsafe(nil), Object)