clean-architecture 5.0.2 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +15 -19
  3. data/.gitignore +4 -0
  4. data/CHANGELOG.md +4 -0
  5. data/Gemfile +1 -0
  6. data/README.md +1 -585
  7. data/bin/tapioca +29 -0
  8. data/clean-architecture.gemspec +4 -4
  9. data/lib/clean-architecture.rb +4 -1
  10. data/lib/clean_architecture/adapters/all.rb +1 -1
  11. data/lib/clean_architecture/adapters/attribute_hash_base.rb +47 -20
  12. data/lib/clean_architecture/all.rb +1 -4
  13. data/lib/clean_architecture/builders/abstract_active_record_entity_builder.rb +43 -13
  14. data/lib/clean_architecture/builders/all.rb +1 -1
  15. data/lib/clean_architecture/checks/all.rb +1 -1
  16. data/lib/clean_architecture/checks/authorization.rb +11 -9
  17. data/lib/clean_architecture/entities/all.rb +1 -3
  18. data/lib/clean_architecture/entities/failure_details.rb +27 -17
  19. data/lib/clean_architecture/matchers/all.rb +1 -1
  20. data/lib/clean_architecture/matchers/use_case_result.rb +9 -3
  21. data/lib/clean_architecture/queries/all.rb +1 -1
  22. data/lib/clean_architecture/queries/http_failure_code.rb +8 -20
  23. data/lib/clean_architecture/queries/http_success_code.rb +14 -7
  24. data/lib/clean_architecture/serializers/all.rb +1 -1
  25. data/lib/clean_architecture/serializers/html_response_from_result.rb +7 -1
  26. data/lib/clean_architecture/serializers/json_response_from_result.rb +4 -4
  27. data/lib/clean_architecture/version.rb +1 -1
  28. data/nix/sources.json +14 -0
  29. data/nix/sources.nix +174 -0
  30. data/run_ci.sh +7 -0
  31. data/shell.nix +17 -12
  32. data/sorbet/config +4 -0
  33. data/sorbet/{rbi/gems → dry-monads-sorbet}/dry-monads.rbi +176 -94
  34. data/sorbet/rbi/gems/activemodel@6.1.4.1.rbi +1292 -0
  35. data/sorbet/rbi/gems/activerecord@6.1.4.1.rbi +8092 -0
  36. data/sorbet/rbi/gems/activesupport@6.1.4.1.rbi +3531 -0
  37. data/sorbet/rbi/gems/{ast.rbi → ast@2.4.2.rbi} +28 -22
  38. data/sorbet/rbi/gems/byebug@11.1.3.rbi +1568 -0
  39. data/sorbet/rbi/gems/coderay@1.1.3.rbi +1005 -0
  40. data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +915 -0
  41. data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +8 -0
  42. data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
  43. data/sorbet/rbi/gems/dry-core@0.7.1.rbi +92 -0
  44. data/sorbet/rbi/gems/dry-equalizer@0.3.0.rbi +28 -0
  45. data/sorbet/rbi/gems/dry-matcher@0.9.0.rbi +56 -0
  46. data/sorbet/rbi/gems/dry-monads-sorbet@1.1.7.rbi +41 -0
  47. data/sorbet/rbi/gems/dry-monads@1.4.0.rbi +697 -0
  48. data/sorbet/rbi/gems/em-websocket@0.5.2.rbi +8 -0
  49. data/sorbet/rbi/gems/eventmachine@1.2.7.rbi +45 -0
  50. data/sorbet/rbi/gems/ffi@1.15.4.rbi +8 -0
  51. data/sorbet/rbi/gems/formatador@0.3.0.rbi +8 -0
  52. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +31 -0
  53. data/sorbet/rbi/gems/guard-livereload@2.5.2.rbi +8 -0
  54. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +211 -0
  55. data/sorbet/rbi/gems/guard@2.18.0.rbi +8 -0
  56. data/sorbet/rbi/gems/http_parser.rb@0.6.0.rbi +8 -0
  57. data/sorbet/rbi/gems/i18n@1.8.10.rbi +8 -0
  58. data/sorbet/rbi/gems/listen@3.7.0.rbi +8 -0
  59. data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +8 -0
  60. data/sorbet/rbi/gems/method_source@1.0.0.rbi +72 -0
  61. data/sorbet/rbi/gems/minitest@5.14.4.rbi +344 -0
  62. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  63. data/sorbet/rbi/gems/nenv@0.3.0.rbi +8 -0
  64. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +8 -0
  65. data/sorbet/rbi/gems/parallel@1.21.0.rbi +113 -0
  66. data/sorbet/rbi/gems/{parser.rbi → parser@3.0.2.0.rbi} +966 -699
  67. data/sorbet/rbi/gems/pry-byebug@3.9.0.rbi +461 -0
  68. data/sorbet/rbi/gems/{pry.rbi → pry@0.13.1.rbi} +2191 -1605
  69. data/sorbet/rbi/gems/{rainbow.rbi → rainbow@3.0.0.rbi} +90 -55
  70. data/sorbet/rbi/gems/{rake.rbi → rake@13.0.6.rbi} +578 -427
  71. data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +8 -0
  72. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
  73. data/sorbet/rbi/gems/rb-readline@0.5.5.rbi +884 -0
  74. data/sorbet/rbi/gems/rbi@0.0.6.rbi +1405 -0
  75. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +1120 -0
  76. data/sorbet/rbi/gems/{rexml.rbi → rexml@3.2.5.rbi} +562 -479
  77. data/sorbet/rbi/gems/{rspec-core.rbi → rspec-core@3.10.1.rbi} +2317 -1533
  78. data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +1574 -0
  79. data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +1462 -0
  80. data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +509 -0
  81. data/sorbet/rbi/gems/rspec@3.10.0.rbi +38 -0
  82. data/sorbet/rbi/gems/rubocop-ast@1.12.0.rbi +1938 -0
  83. data/sorbet/rbi/gems/rubocop-rspec@2.5.0.rbi +1786 -0
  84. data/sorbet/rbi/gems/rubocop@1.22.1.rbi +13252 -0
  85. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +405 -0
  86. data/sorbet/rbi/gems/shellany@0.0.1.rbi +8 -0
  87. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
  88. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
  89. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
  90. data/sorbet/rbi/gems/sorbet-struct-comparable@1.1.0.rbi +17 -0
  91. data/sorbet/rbi/gems/spoom@1.1.5.rbi +1241 -0
  92. data/sorbet/rbi/gems/stackprof@0.2.17.rbi +98 -0
  93. data/sorbet/rbi/gems/tapioca@0.5.2.rbi +949 -0
  94. data/sorbet/rbi/gems/thor@1.1.0.rbi +839 -0
  95. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +8 -0
  96. data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +26 -0
  97. data/sorbet/rbi/gems/unparser@0.6.0.rbi +8 -0
  98. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +8 -0
  99. data/sorbet/tapioca/require.rb +9 -0
  100. metadata +88 -91
  101. data/.ruby-version +0 -1
  102. data/lib/clean_architecture/entities/targeted_parameters.rb +0 -24
  103. data/lib/clean_architecture/entities/untargeted_parameters.rb +0 -21
  104. data/lib/clean_architecture/interfaces/all.rb +0 -12
  105. data/lib/clean_architecture/interfaces/authorization_parameters.rb +0 -19
  106. data/lib/clean_architecture/interfaces/base_parameters.rb +0 -24
  107. data/lib/clean_architecture/interfaces/jsonable.rb +0 -16
  108. data/lib/clean_architecture/interfaces/targeted_parameters.rb +0 -19
  109. data/lib/clean_architecture/interfaces/use_case.rb +0 -20
  110. data/lib/clean_architecture/interfaces/use_case_actor.rb +0 -20
  111. data/lib/clean_architecture/interfaces/use_case_target.rb +0 -24
  112. data/lib/clean_architecture/types.rb +0 -8
  113. data/lib/clean_architecture/use_cases/abstract_use_case.rb +0 -63
  114. data/lib/clean_architecture/use_cases/all.rb +0 -10
  115. data/lib/clean_architecture/use_cases/contract.rb +0 -9
  116. data/lib/clean_architecture/use_cases/errors.rb +0 -58
  117. data/lib/clean_architecture/use_cases/form.rb +0 -116
  118. data/lib/clean_architecture/use_cases/parameters.rb +0 -43
  119. data/sorbet/rbi/gems/activemodel.rbi +0 -75
  120. data/sorbet/rbi/gems/activesupport.rbi +0 -440
  121. data/sorbet/rbi/gems/byebug.rbi +0 -1040
  122. data/sorbet/rbi/gems/coderay.rbi +0 -92
  123. data/sorbet/rbi/gems/concurrent-ruby.rbi +0 -1586
  124. data/sorbet/rbi/gems/docile.rbi +0 -32
  125. data/sorbet/rbi/gems/dry-configurable.rbi +0 -139
  126. data/sorbet/rbi/gems/dry-container.rbi +0 -89
  127. data/sorbet/rbi/gems/dry-core.rbi +0 -80
  128. data/sorbet/rbi/gems/dry-equalizer.rbi +0 -26
  129. data/sorbet/rbi/gems/dry-inflector.rbi +0 -73
  130. data/sorbet/rbi/gems/dry-initializer.rbi +0 -209
  131. data/sorbet/rbi/gems/dry-logic.rbi +0 -305
  132. data/sorbet/rbi/gems/dry-matcher.rbi +0 -34
  133. data/sorbet/rbi/gems/dry-schema.rbi +0 -786
  134. data/sorbet/rbi/gems/dry-struct.rbi +0 -137
  135. data/sorbet/rbi/gems/dry-types.rbi +0 -709
  136. data/sorbet/rbi/gems/dry-validation.rbi +0 -288
  137. data/sorbet/rbi/gems/duckface-interfaces.rbi +0 -94
  138. data/sorbet/rbi/gems/i18n.rbi +0 -133
  139. data/sorbet/rbi/gems/jaro_winkler.rbi +0 -15
  140. data/sorbet/rbi/gems/method_source.rbi +0 -64
  141. data/sorbet/rbi/gems/parallel.rbi +0 -82
  142. data/sorbet/rbi/gems/pry-byebug.rbi +0 -155
  143. data/sorbet/rbi/gems/rb-readline.rbi +0 -767
  144. data/sorbet/rbi/gems/rspec-expectations.rbi +0 -398
  145. data/sorbet/rbi/gems/rspec-mocks.rbi +0 -816
  146. data/sorbet/rbi/gems/rspec-support.rbi +0 -271
  147. data/sorbet/rbi/gems/rspec.rbi +0 -15
  148. data/sorbet/rbi/gems/rubocop-rspec.rbi +0 -922
  149. data/sorbet/rbi/gems/rubocop.rbi +0 -7319
  150. data/sorbet/rbi/gems/ruby-progressbar.rbi +0 -305
  151. data/sorbet/rbi/gems/simplecov-html.rbi +0 -35
  152. data/sorbet/rbi/gems/simplecov.rbi +0 -361
  153. data/sorbet/rbi/gems/stackprof.rbi +0 -52
  154. data/sorbet/rbi/gems/unicode-display_width.rbi +0 -17
  155. data/sorbet/rbi/hidden-definitions/errors.txt +0 -8580
  156. data/sorbet/rbi/hidden-definitions/hidden.rbi +0 -17036
  157. data/sorbet/rbi/sorbet-typed/lib/activemodel/all/activemodel.rbi +0 -452
  158. data/sorbet/rbi/sorbet-typed/lib/activesupport/>=6.0.0.rc1/activesupport.rbi +0 -23
  159. data/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +0 -979
  160. data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +0 -8684
  161. data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +0 -108
  162. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +0 -276
  163. data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +0 -4222
  164. data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +0 -111
  165. data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +0 -543
  166. data/sorbet/rbi/todo.rbi +0 -10
@@ -0,0 +1,1292 @@
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 `bin/tapioca gem activemodel`.
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), value = 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 original_value_for_database; end
34
+ def type; end
35
+ def type_cast(*_arg0); end
36
+ def value; end
37
+ def value_before_type_cast; end
38
+ def value_for_database; end
39
+ def with_cast_value(value); end
40
+ def with_type(type); end
41
+ def with_value_from_database(value); end
42
+ def with_value_from_user(value); end
43
+
44
+ private
45
+
46
+ def _original_value_for_database; end
47
+ def assigned?; end
48
+ def changed_from_assignment?; end
49
+ def initialize_dup(other); end
50
+ def original_attribute; end
51
+
52
+ class << self
53
+ def from_database(name, value_before_type_cast, type, value = T.unsafe(nil)); end
54
+ def from_user(name, value_before_type_cast, type, original_attribute = T.unsafe(nil)); end
55
+ def null(name); end
56
+ def uninitialized(name, type); end
57
+ def with_cast_value(name, value_before_type_cast, type); end
58
+ end
59
+ end
60
+
61
+ class ActiveModel::Attribute::FromDatabase < ::ActiveModel::Attribute
62
+ def type_cast(value); end
63
+
64
+ private
65
+
66
+ def _original_value_for_database; end
67
+ end
68
+
69
+ class ActiveModel::Attribute::FromUser < ::ActiveModel::Attribute
70
+ def came_from_user?; end
71
+ def type_cast(value); end
72
+ end
73
+
74
+ class ActiveModel::Attribute::Null < ::ActiveModel::Attribute
75
+ def initialize(name); end
76
+
77
+ def type_cast(*_arg0); end
78
+ def with_cast_value(value); end
79
+ def with_type(type); end
80
+ def with_value_from_database(value); end
81
+ def with_value_from_user(value); end
82
+ end
83
+
84
+ class ActiveModel::Attribute::Uninitialized < ::ActiveModel::Attribute
85
+ def initialize(name, type); end
86
+
87
+ def forgetting_assignment; end
88
+ def initialized?; end
89
+ def original_value; end
90
+ def value; end
91
+ def value_for_database; end
92
+ def with_type(type); end
93
+ end
94
+
95
+ ActiveModel::Attribute::Uninitialized::UNINITIALIZED_ORIGINAL_VALUE = T.let(T.unsafe(nil), Object)
96
+
97
+ class ActiveModel::Attribute::UserProvidedDefault < ::ActiveModel::Attribute::FromUser
98
+ def initialize(name, value, type, database_default); end
99
+
100
+ def marshal_dump; end
101
+ def marshal_load(values); end
102
+ def value_before_type_cast; end
103
+ def with_type(type); end
104
+
105
+ private
106
+
107
+ def user_provided_value; end
108
+ end
109
+
110
+ class ActiveModel::Attribute::WithCastValue < ::ActiveModel::Attribute
111
+ def changed_in_place?; end
112
+ def type_cast(value); end
113
+ end
114
+
115
+ module ActiveModel::AttributeAssignment
116
+ include ::ActiveModel::ForbiddenAttributesProtection
117
+
118
+ def assign_attributes(new_attributes); end
119
+ def attributes=(new_attributes); end
120
+
121
+ private
122
+
123
+ def _assign_attribute(k, v); end
124
+ def _assign_attributes(attributes); end
125
+ end
126
+
127
+ module ActiveModel::AttributeMethods
128
+ extend ::ActiveSupport::Concern
129
+
130
+ mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods
131
+
132
+ def attribute_missing(match, *args, &block); end
133
+ def method_missing(method, *args, &block); end
134
+ def respond_to?(method, include_private_methods = T.unsafe(nil)); end
135
+ def respond_to_without_attributes?(*_arg0); end
136
+
137
+ private
138
+
139
+ def _read_attribute(attr); end
140
+ def attribute_method?(attr_name); end
141
+ def matched_attribute_method(method_name); end
142
+ def missing_attribute(attr_name, stack); end
143
+ end
144
+
145
+ module ActiveModel::AttributeMethods::AttrNames
146
+ class << self
147
+ def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end
148
+ end
149
+ end
150
+
151
+ ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp)
152
+ ActiveModel::AttributeMethods::CALL_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp)
153
+
154
+ module ActiveModel::AttributeMethods::ClassMethods
155
+ def alias_attribute(new_name, old_name); end
156
+ def attribute_alias(name); end
157
+ def attribute_alias?(new_name); end
158
+ def attribute_method_affix(*affixes); end
159
+ def attribute_method_prefix(*prefixes); end
160
+ def attribute_method_suffix(*suffixes); end
161
+ def define_attribute_method(attr_name, _owner: T.unsafe(nil)); end
162
+ def define_attribute_methods(*attr_names); end
163
+ def undefine_attribute_methods; end
164
+
165
+ private
166
+
167
+ def attribute_method_matchers_cache; end
168
+ def attribute_method_matchers_matching(method_name); end
169
+ def define_proxy_call(include_private, code_generator, name, target, *extra); end
170
+ def generated_attribute_methods; end
171
+ def instance_method_already_implemented?(method_name); end
172
+ end
173
+
174
+ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher
175
+ def initialize(options = T.unsafe(nil)); end
176
+
177
+ def match(method_name); end
178
+ def method_name(attr_name); end
179
+ def prefix; end
180
+ def suffix; end
181
+ def target; end
182
+ end
183
+
184
+ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher::AttributeMethodMatch < ::Struct
185
+ def attr_name; end
186
+ def attr_name=(_); end
187
+ def target; end
188
+ def target=(_); end
189
+
190
+ class << self
191
+ def [](*_arg0); end
192
+ def inspect; end
193
+ def members; end
194
+ def new(*_arg0); end
195
+ end
196
+ end
197
+
198
+ class ActiveModel::AttributeMethods::ClassMethods::CodeGenerator
199
+ def initialize(owner, path, line); end
200
+
201
+ def <<(source_line); end
202
+ def execute; end
203
+ def rename_method(old_name, new_name); end
204
+
205
+ class << self
206
+ def batch(owner, path, line); end
207
+ end
208
+ end
209
+
210
+ ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp)
211
+
212
+ class ActiveModel::AttributeMutationTracker
213
+ def initialize(attributes); end
214
+
215
+ def any_changes?; end
216
+ def change_to_attribute(attr_name); end
217
+ def changed?(attr_name, from: T.unsafe(nil), to: T.unsafe(nil)); end
218
+ def changed_attribute_names; end
219
+ def changed_in_place?(attr_name); end
220
+ def changed_values; end
221
+ def changes; end
222
+ def force_change(attr_name); end
223
+ def forget_change(attr_name); end
224
+ def original_value(attr_name); end
225
+
226
+ private
227
+
228
+ def attr_names; end
229
+ def attribute_changed?(attr_name); end
230
+ def attributes; end
231
+ def fetch_value(attr_name); end
232
+ def forced_changes; end
233
+ end
234
+
235
+ ActiveModel::AttributeMutationTracker::OPTION_NOT_GIVEN = T.let(T.unsafe(nil), Object)
236
+
237
+ class ActiveModel::AttributeSet
238
+ def initialize(attributes); end
239
+
240
+ def ==(other); end
241
+ def [](name); end
242
+ def []=(name, value); end
243
+ def accessed; end
244
+ def deep_dup; end
245
+ def each_value(*_arg0, &_arg1); end
246
+ def except(*_arg0, &_arg1); end
247
+ def fetch(*_arg0, &_arg1); end
248
+ def fetch_value(name, &block); end
249
+ def freeze; end
250
+ def key?(name); end
251
+ def keys; end
252
+ def map(&block); end
253
+ def reset(key); end
254
+ def to_h; end
255
+ def to_hash; end
256
+ def values_before_type_cast; end
257
+ def write_cast_value(name, value); end
258
+ def write_from_database(name, value); end
259
+ def write_from_user(name, value); end
260
+
261
+ protected
262
+
263
+ def attributes; end
264
+
265
+ private
266
+
267
+ def default_attribute(name); end
268
+ def initialize_clone(_); end
269
+ def initialize_dup(_); end
270
+ end
271
+
272
+ class ActiveModel::AttributeSet::Builder
273
+ def initialize(types, default_attributes = T.unsafe(nil)); end
274
+
275
+ def build_from_database(values = T.unsafe(nil), additional_types = T.unsafe(nil)); end
276
+ def default_attributes; end
277
+ def types; end
278
+ end
279
+
280
+ class ActiveModel::AttributeSet::YAMLEncoder
281
+ def initialize(default_types); end
282
+
283
+ def decode(coder); end
284
+ def encode(attribute_set, coder); end
285
+
286
+ private
287
+
288
+ def default_types; end
289
+ end
290
+
291
+ module ActiveModel::Attributes
292
+ extend ::ActiveSupport::Concern
293
+ include ::ActiveModel::AttributeMethods
294
+
295
+ mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods
296
+ mixes_in_class_methods ::ActiveModel::Attributes::ClassMethods
297
+
298
+ def initialize(*_arg0); end
299
+
300
+ def attribute_names; end
301
+ def attributes; end
302
+ def freeze; end
303
+
304
+ private
305
+
306
+ def _write_attribute(attr_name, value); end
307
+ def attribute(attr_name); end
308
+ def attribute=(attr_name, value); end
309
+ def initialize_dup(other); end
310
+ end
311
+
312
+ module ActiveModel::Attributes::ClassMethods
313
+ def attribute(name, type = T.unsafe(nil), **options); end
314
+ def attribute_names; end
315
+
316
+ private
317
+
318
+ def define_default_attribute(name, value, type); end
319
+ def define_method_attribute=(name, owner:); end
320
+ end
321
+
322
+ ActiveModel::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil), Object)
323
+
324
+ class ActiveModel::BlockValidator < ::ActiveModel::EachValidator
325
+ def initialize(options, &block); end
326
+
327
+ private
328
+
329
+ def validate_each(record, attribute, value); end
330
+ end
331
+
332
+ module ActiveModel::Callbacks
333
+ def define_model_callbacks(*callbacks); end
334
+
335
+ private
336
+
337
+ def _define_after_model_callback(klass, callback); end
338
+ def _define_around_model_callback(klass, callback); end
339
+ def _define_before_model_callback(klass, callback); end
340
+
341
+ class << self
342
+ def extended(base); end
343
+ end
344
+ end
345
+
346
+ module ActiveModel::Conversion
347
+ extend ::ActiveSupport::Concern
348
+
349
+ mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods
350
+
351
+ def to_key; end
352
+ def to_model; end
353
+ def to_param; end
354
+ def to_partial_path; end
355
+ end
356
+
357
+ module ActiveModel::Conversion::ClassMethods
358
+ def _to_partial_path; end
359
+ end
360
+
361
+ class ActiveModel::DeprecationHandlingDetailsHash < ::SimpleDelegator
362
+ def initialize(details); end
363
+ end
364
+
365
+ class ActiveModel::DeprecationHandlingMessageArray < ::SimpleDelegator
366
+ def initialize(content, errors, attribute); end
367
+
368
+ def <<(message); end
369
+ def clear; end
370
+ end
371
+
372
+ class ActiveModel::DeprecationHandlingMessageHash < ::SimpleDelegator
373
+ def initialize(errors); end
374
+
375
+ def []=(attribute, value); end
376
+ def delete(attribute); end
377
+
378
+ private
379
+
380
+ def prepare_content; end
381
+ end
382
+
383
+ module ActiveModel::Dirty
384
+ extend ::ActiveSupport::Concern
385
+ include ::ActiveModel::AttributeMethods
386
+
387
+ mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods
388
+
389
+ def as_json(options = T.unsafe(nil)); end
390
+ def attribute_changed?(attr_name, **options); end
391
+ def attribute_changed_in_place?(attr_name); end
392
+ def attribute_previously_changed?(attr_name, **options); end
393
+ def attribute_previously_was(attr_name); end
394
+ def attribute_was(attr_name); end
395
+ def changed; end
396
+ def changed?; end
397
+ def changed_attributes; end
398
+ def changes; end
399
+ def changes_applied; end
400
+ def clear_attribute_changes(attr_names); end
401
+ def clear_changes_information; end
402
+ def previous_changes; end
403
+ def restore_attributes(attr_names = T.unsafe(nil)); end
404
+
405
+ private
406
+
407
+ def attribute_change(attr_name); end
408
+ def attribute_previous_change(attr_name); end
409
+ def attribute_will_change!(attr_name); end
410
+ def clear_attribute_change(attr_name); end
411
+ def forget_attribute_assignments; end
412
+ def initialize_dup(other); end
413
+ def mutations_before_last_save; end
414
+ def mutations_from_database; end
415
+ def restore_attribute!(attr_name); end
416
+ end
417
+
418
+ class ActiveModel::EachValidator < ::ActiveModel::Validator
419
+ def initialize(options); end
420
+
421
+ def attributes; end
422
+ def check_validity!; end
423
+ def validate(record); end
424
+ def validate_each(record, attribute, value); end
425
+
426
+ private
427
+
428
+ def prepare_value_for_validation(value, record, attr_name); end
429
+ end
430
+
431
+ class ActiveModel::Error
432
+ def initialize(base, attribute, type = T.unsafe(nil), **options); end
433
+
434
+ def ==(other); end
435
+ def attribute; end
436
+ def base; end
437
+ def detail; end
438
+ def details; end
439
+ def eql?(other); end
440
+ def full_message; end
441
+ def hash; end
442
+ def i18n_customize_full_message; end
443
+ def i18n_customize_full_message=(_arg0); end
444
+ def i18n_customize_full_message?; end
445
+ def inspect; end
446
+ def match?(attribute, type = T.unsafe(nil), **options); end
447
+ def message; end
448
+ def options; end
449
+ def raw_type; end
450
+ def strict_match?(attribute, type, **options); end
451
+ def type; end
452
+
453
+ protected
454
+
455
+ def attributes_for_hash; end
456
+
457
+ private
458
+
459
+ def initialize_dup(other); end
460
+
461
+ class << self
462
+ def full_message(attribute, message, base); end
463
+ def generate_message(attribute, type, base, options); end
464
+ def i18n_customize_full_message; end
465
+ def i18n_customize_full_message=(value); end
466
+ def i18n_customize_full_message?; end
467
+ end
468
+ end
469
+
470
+ ActiveModel::Error::CALLBACKS_OPTIONS = T.let(T.unsafe(nil), Array)
471
+ ActiveModel::Error::MESSAGE_OPTIONS = T.let(T.unsafe(nil), Array)
472
+
473
+ class ActiveModel::Errors
474
+ include ::Enumerable
475
+ extend ::Forwardable
476
+
477
+ def initialize(base); end
478
+
479
+ def [](attribute); end
480
+ def add(attribute, type = T.unsafe(nil), **options); end
481
+ def added?(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end
482
+ def any?(*args, &block); end
483
+ def as_json(options = T.unsafe(nil)); end
484
+ def attribute_names; end
485
+ def blank?(*args, &block); end
486
+ def clear(*args, &block); end
487
+ def copy!(other); end
488
+ def count(*args, &block); end
489
+ def delete(attribute, type = T.unsafe(nil), **options); end
490
+ def details; end
491
+ def each(&block); end
492
+ def empty?(*args, &block); end
493
+ def errors; end
494
+ def full_message(attribute, message); end
495
+ def full_messages; end
496
+ def full_messages_for(attribute); end
497
+ def generate_message(attribute, type = T.unsafe(nil), options = T.unsafe(nil)); end
498
+ def group_by_attribute; end
499
+ def has_key?(attribute); end
500
+ def import(error, override_options = T.unsafe(nil)); end
501
+ def include?(attribute); end
502
+ def init_with(coder); end
503
+ def key?(attribute); end
504
+ def keys; end
505
+ def marshal_load(array); end
506
+ def merge!(other); end
507
+ def messages; end
508
+ def messages_for(attribute); end
509
+ def objects; end
510
+ def of_kind?(attribute, type = T.unsafe(nil)); end
511
+ def size(*args, &block); end
512
+ def slice!(*keys); end
513
+ def to_a; end
514
+ def to_h; end
515
+ def to_hash(full_messages = T.unsafe(nil)); end
516
+ def to_xml(options = T.unsafe(nil)); end
517
+ def uniq!(*args, &block); end
518
+ def values; end
519
+ def where(attribute, type = T.unsafe(nil), **options); end
520
+
521
+ private
522
+
523
+ def add_from_legacy_details_hash(details); end
524
+ def deprecation_removal_warning(method_name, alternative_message = T.unsafe(nil)); end
525
+ def deprecation_rename_warning(old_method_name, new_method_name); end
526
+ def initialize_dup(other); end
527
+ def normalize_arguments(attribute, type, **options); end
528
+ end
529
+
530
+ ActiveModel::Errors::LEGACY_ATTRIBUTES = T.let(T.unsafe(nil), Array)
531
+ class ActiveModel::ForbiddenAttributesError < ::StandardError; end
532
+
533
+ module ActiveModel::ForbiddenAttributesProtection
534
+ private
535
+
536
+ def sanitize_for_mass_assignment(attributes); end
537
+ def sanitize_forbidden_attributes(attributes); end
538
+ end
539
+
540
+ class ActiveModel::ForcedMutationTracker < ::ActiveModel::AttributeMutationTracker
541
+ def initialize(attributes); end
542
+
543
+ def change_to_attribute(attr_name); end
544
+ def changed_in_place?(attr_name); end
545
+ def finalize_changes; end
546
+ def force_change(attr_name); end
547
+ def forget_change(attr_name); end
548
+ def original_value(attr_name); end
549
+
550
+ private
551
+
552
+ def attr_names; end
553
+ def attribute_changed?(attr_name); end
554
+ def clone_value(attr_name); end
555
+ def fetch_value(attr_name); end
556
+ def finalized_changes; end
557
+ end
558
+
559
+ class ActiveModel::LazyAttributeHash
560
+ def initialize(types, values, additional_types, default_attributes, delegate_hash = T.unsafe(nil)); end
561
+
562
+ def ==(other); end
563
+ def [](key); end
564
+ def []=(key, value); end
565
+ def deep_dup; end
566
+ def each_key(&block); end
567
+ def each_value(*_arg0, &_arg1); end
568
+ def except(*_arg0, &_arg1); end
569
+ def fetch(*_arg0, &_arg1); end
570
+ def key?(key); end
571
+ def marshal_dump; end
572
+ def marshal_load(values); end
573
+ def transform_values(*_arg0, &_arg1); end
574
+
575
+ protected
576
+
577
+ def materialize; end
578
+
579
+ private
580
+
581
+ def additional_types; end
582
+ def assign_default_value(name); end
583
+ def default_attributes; end
584
+ def delegate_hash; end
585
+ def initialize_dup(_); end
586
+ def types; end
587
+ def values; end
588
+ end
589
+
590
+ class ActiveModel::LazyAttributeSet < ::ActiveModel::AttributeSet
591
+ def initialize(values, types, additional_types, default_attributes, attributes = T.unsafe(nil)); end
592
+
593
+ def fetch_value(name, &block); end
594
+ def key?(name); end
595
+ def keys; end
596
+
597
+ protected
598
+
599
+ def attributes; end
600
+
601
+ private
602
+
603
+ def additional_types; end
604
+ def default_attribute(name, value_present = T.unsafe(nil), value = T.unsafe(nil)); end
605
+ def default_attributes; end
606
+ def types; end
607
+ def values; end
608
+ end
609
+
610
+ module ActiveModel::Lint; end
611
+
612
+ module ActiveModel::Lint::Tests
613
+ def test_errors_aref; end
614
+ def test_model_naming; end
615
+ def test_persisted?; end
616
+ def test_to_key; end
617
+ def test_to_param; end
618
+ def test_to_partial_path; end
619
+
620
+ private
621
+
622
+ def assert_boolean(result, name); end
623
+ def model; end
624
+ end
625
+
626
+ class ActiveModel::MissingAttributeError < ::NoMethodError; end
627
+
628
+ module ActiveModel::Model
629
+ include ::ActiveModel::ForbiddenAttributesProtection
630
+ include ::ActiveModel::AttributeAssignment
631
+ extend ::ActiveSupport::Concern
632
+ include ::ActiveSupport::Callbacks
633
+ include ::ActiveModel::Validations::HelperMethods
634
+ include ::ActiveModel::Validations
635
+ include ::ActiveModel::Conversion
636
+
637
+ mixes_in_class_methods ::ActiveModel::Validations::ClassMethods
638
+ mixes_in_class_methods ::ActiveModel::Naming
639
+ mixes_in_class_methods ::ActiveModel::Callbacks
640
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
641
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
642
+ mixes_in_class_methods ::ActiveModel::Translation
643
+ mixes_in_class_methods ::ActiveModel::Validations::HelperMethods
644
+ mixes_in_class_methods ::ActiveModel::Conversion::ClassMethods
645
+
646
+ def initialize(attributes = T.unsafe(nil)); end
647
+
648
+ def persisted?; end
649
+ end
650
+
651
+ class ActiveModel::Name
652
+ include ::Comparable
653
+
654
+ def initialize(klass, namespace = T.unsafe(nil), name = T.unsafe(nil)); end
655
+
656
+ def !~(*_arg0, &_arg1); end
657
+ def <=>(*_arg0, &_arg1); end
658
+ def ==(arg); end
659
+ def ===(arg); end
660
+ def =~(*_arg0, &_arg1); end
661
+ def as_json(*_arg0, &_arg1); end
662
+ def cache_key; end
663
+ def collection; end
664
+ def collection=(_arg0); end
665
+ def element; end
666
+ def element=(_arg0); end
667
+ def eql?(*_arg0, &_arg1); end
668
+ def human(options = T.unsafe(nil)); end
669
+ def i18n_key; end
670
+ def i18n_key=(_arg0); end
671
+ def match?(*_arg0, &_arg1); end
672
+ def name; end
673
+ def name=(_arg0); end
674
+ def param_key; end
675
+ def param_key=(_arg0); end
676
+ def plural; end
677
+ def plural=(_arg0); end
678
+ def route_key; end
679
+ def route_key=(_arg0); end
680
+ def singular; end
681
+ def singular=(_arg0); end
682
+ def singular_route_key; end
683
+ def singular_route_key=(_arg0); end
684
+ def to_s(*_arg0, &_arg1); end
685
+ def to_str(*_arg0, &_arg1); end
686
+
687
+ private
688
+
689
+ def _singularize(string); end
690
+ end
691
+
692
+ module ActiveModel::Naming
693
+ def model_name; end
694
+
695
+ class << self
696
+ def extended(base); end
697
+ def param_key(record_or_class); end
698
+ def plural(record_or_class); end
699
+ def route_key(record_or_class); end
700
+ def singular(record_or_class); end
701
+ def singular_route_key(record_or_class); end
702
+ def uncountable?(record_or_class); end
703
+
704
+ private
705
+
706
+ def model_name_from_record_or_class(record_or_class); end
707
+ end
708
+ end
709
+
710
+ class ActiveModel::NestedError < ::ActiveModel::Error
711
+ extend ::Forwardable
712
+
713
+ def initialize(base, inner_error, override_options = T.unsafe(nil)); end
714
+
715
+ def inner_error; end
716
+ def message(*args, &block); end
717
+ end
718
+
719
+ class ActiveModel::NullMutationTracker
720
+ include ::Singleton
721
+ extend ::Singleton::SingletonClassMethods
722
+
723
+ def any_changes?; end
724
+ def change_to_attribute(attr_name); end
725
+ def changed?(attr_name, **_arg1); end
726
+ def changed_attribute_names; end
727
+ def changed_in_place?(attr_name); end
728
+ def changed_values; end
729
+ def changes; end
730
+ def original_value(attr_name); end
731
+ end
732
+
733
+ class ActiveModel::RangeError < ::RangeError; end
734
+
735
+ module ActiveModel::SecurePassword
736
+ extend ::ActiveSupport::Concern
737
+
738
+ mixes_in_class_methods ::ActiveModel::SecurePassword::ClassMethods
739
+
740
+ class << self
741
+ def min_cost; end
742
+ def min_cost=(_arg0); end
743
+ end
744
+ end
745
+
746
+ module ActiveModel::SecurePassword::ClassMethods
747
+ def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil)); end
748
+ end
749
+
750
+ class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module
751
+ def initialize(attribute); end
752
+ end
753
+
754
+ ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), Integer)
755
+
756
+ module ActiveModel::Serialization
757
+ def read_attribute_for_serialization(*_arg0); end
758
+ def serializable_hash(options = T.unsafe(nil)); end
759
+
760
+ private
761
+
762
+ def serializable_add_includes(options = T.unsafe(nil)); end
763
+ def serializable_attributes(attribute_names); end
764
+ end
765
+
766
+ module ActiveModel::Serializers
767
+ extend ::ActiveSupport::Autoload
768
+ end
769
+
770
+ module ActiveModel::Serializers::JSON
771
+ include ::ActiveModel::Serialization
772
+ extend ::ActiveSupport::Concern
773
+
774
+ mixes_in_class_methods ::ActiveModel::Naming
775
+
776
+ def as_json(options = T.unsafe(nil)); end
777
+ def from_json(json, include_root = T.unsafe(nil)); end
778
+ end
779
+
780
+ class ActiveModel::StrictValidationFailed < ::StandardError; end
781
+
782
+ module ActiveModel::Translation
783
+ include ::ActiveModel::Naming
784
+
785
+ def human_attribute_name(attribute, options = T.unsafe(nil)); end
786
+ def i18n_scope; end
787
+ def lookup_ancestors; end
788
+ end
789
+
790
+ module ActiveModel::Type
791
+ class << self
792
+ def default_value; end
793
+ def lookup(*args, **kwargs); end
794
+ def register(type_name, klass = T.unsafe(nil), **options, &block); end
795
+ def registry; end
796
+ def registry=(_arg0); end
797
+ end
798
+ end
799
+
800
+ class ActiveModel::Type::BigInteger < ::ActiveModel::Type::Integer
801
+ private
802
+
803
+ def max_value; end
804
+ end
805
+
806
+ class ActiveModel::Type::Binary < ::ActiveModel::Type::Value
807
+ def binary?; end
808
+ def cast(value); end
809
+ def changed_in_place?(raw_old_value, value); end
810
+ def serialize(value); end
811
+ def type; end
812
+ end
813
+
814
+ class ActiveModel::Type::Binary::Data
815
+ def initialize(value); end
816
+
817
+ def ==(other); end
818
+ def hex; end
819
+ def to_s; end
820
+ def to_str; end
821
+ end
822
+
823
+ class ActiveModel::Type::Boolean < ::ActiveModel::Type::Value
824
+ def serialize(value); end
825
+ def type; end
826
+
827
+ private
828
+
829
+ def cast_value(value); end
830
+ end
831
+
832
+ ActiveModel::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Set)
833
+
834
+ class ActiveModel::Type::Date < ::ActiveModel::Type::Value
835
+ include ::ActiveModel::Type::Helpers::Timezone
836
+ include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods
837
+
838
+ def type; end
839
+ def type_cast_for_schema(value); end
840
+
841
+ private
842
+
843
+ def cast_value(value); end
844
+ def fallback_string_to_date(string); end
845
+ def fast_string_to_date(string); end
846
+ def new_date(year, mon, mday); end
847
+ def value_from_multiparameter_assignment(*_arg0); end
848
+ end
849
+
850
+ ActiveModel::Type::Date::ISO_DATE = T.let(T.unsafe(nil), Regexp)
851
+
852
+ class ActiveModel::Type::DateTime < ::ActiveModel::Type::Value
853
+ include ::ActiveModel::Type::Helpers::Timezone
854
+ include ::ActiveModel::Type::Helpers::TimeValue
855
+ include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods
856
+
857
+ def type; end
858
+
859
+ private
860
+
861
+ def cast_value(value); end
862
+ def fallback_string_to_time(string); end
863
+ def microseconds(time); end
864
+ def value_from_multiparameter_assignment(values_hash); end
865
+ end
866
+
867
+ class ActiveModel::Type::Decimal < ::ActiveModel::Type::Value
868
+ include ::ActiveModel::Type::Helpers::Numeric
869
+
870
+ def type; end
871
+ def type_cast_for_schema(value); end
872
+
873
+ private
874
+
875
+ def apply_scale(value); end
876
+ def cast_value(value); end
877
+ def convert_float_to_big_decimal(value); end
878
+ def float_precision; end
879
+ end
880
+
881
+ ActiveModel::Type::Decimal::BIGDECIMAL_PRECISION = T.let(T.unsafe(nil), Integer)
882
+
883
+ class ActiveModel::Type::Float < ::ActiveModel::Type::Value
884
+ include ::ActiveModel::Type::Helpers::Numeric
885
+
886
+ def type; end
887
+ def type_cast_for_schema(value); end
888
+
889
+ private
890
+
891
+ def cast_value(value); end
892
+ end
893
+
894
+ module ActiveModel::Type::Helpers; end
895
+
896
+ class ActiveModel::Type::Helpers::AcceptsMultiparameterTime < ::Module
897
+ def initialize(defaults: T.unsafe(nil)); end
898
+ end
899
+
900
+ module ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods
901
+ def assert_valid_value(value); end
902
+ def cast(value); end
903
+ def serialize(value); end
904
+ def value_constructed_by_mass_assignment?(value); end
905
+ end
906
+
907
+ module ActiveModel::Type::Helpers::Mutable
908
+ def cast(value); end
909
+ def changed_in_place?(raw_old_value, new_value); end
910
+ end
911
+
912
+ module ActiveModel::Type::Helpers::Numeric
913
+ def cast(value); end
914
+ def changed?(old_value, _new_value, new_value_before_type_cast); end
915
+ def serialize(value); end
916
+
917
+ private
918
+
919
+ def non_numeric_string?(value); end
920
+ def number_to_non_number?(old_value, new_value_before_type_cast); end
921
+ end
922
+
923
+ ActiveModel::Type::Helpers::Numeric::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp)
924
+
925
+ module ActiveModel::Type::Helpers::TimeValue
926
+ def apply_seconds_precision(value); end
927
+ def serialize(value); end
928
+ def type_cast_for_schema(value); end
929
+ def user_input_in_time_zone(value); end
930
+
931
+ private
932
+
933
+ def fast_string_to_time(string); end
934
+ def new_time(year, mon, mday, hour, min, sec, microsec, offset = T.unsafe(nil)); end
935
+ end
936
+
937
+ ActiveModel::Type::Helpers::TimeValue::ISO_DATETIME = T.let(T.unsafe(nil), Regexp)
938
+
939
+ module ActiveModel::Type::Helpers::Timezone
940
+ def default_timezone; end
941
+ def is_utc?; end
942
+ end
943
+
944
+ class ActiveModel::Type::ImmutableString < ::ActiveModel::Type::Value
945
+ def initialize(**args); end
946
+
947
+ def serialize(value); end
948
+ def type; end
949
+
950
+ private
951
+
952
+ def cast_value(value); end
953
+ end
954
+
955
+ class ActiveModel::Type::Integer < ::ActiveModel::Type::Value
956
+ include ::ActiveModel::Type::Helpers::Numeric
957
+
958
+ def initialize(**_arg0); end
959
+
960
+ def deserialize(value); end
961
+ def serializable?(value); end
962
+ def serialize(value); end
963
+ def type; end
964
+
965
+ private
966
+
967
+ def _limit; end
968
+ def cast_value(value); end
969
+ def ensure_in_range(value); end
970
+ def in_range?(value); end
971
+ def max_value; end
972
+ def min_value; end
973
+ def range; end
974
+ end
975
+
976
+ ActiveModel::Type::Integer::DEFAULT_LIMIT = T.let(T.unsafe(nil), Integer)
977
+
978
+ class ActiveModel::Type::Registration
979
+ def initialize(name, block, **_arg2); end
980
+
981
+ def call(_registry, *args, **kwargs); end
982
+ def matches?(type_name, *args, **kwargs); end
983
+
984
+ private
985
+
986
+ def block; end
987
+ def name; end
988
+ end
989
+
990
+ class ActiveModel::Type::Registry
991
+ def initialize; end
992
+
993
+ def lookup(symbol, *args, **kwargs); end
994
+ def register(type_name, klass = T.unsafe(nil), **options, &block); end
995
+
996
+ private
997
+
998
+ def find_registration(symbol, *args, **kwargs); end
999
+ def initialize_dup(other); end
1000
+ def registration_klass; end
1001
+ def registrations; end
1002
+ end
1003
+
1004
+ class ActiveModel::Type::String < ::ActiveModel::Type::ImmutableString
1005
+ def changed_in_place?(raw_old_value, new_value); end
1006
+ def to_immutable_string; end
1007
+
1008
+ private
1009
+
1010
+ def cast_value(value); end
1011
+ end
1012
+
1013
+ class ActiveModel::Type::Time < ::ActiveModel::Type::Value
1014
+ include ::ActiveModel::Type::Helpers::Timezone
1015
+ include ::ActiveModel::Type::Helpers::TimeValue
1016
+ include ::ActiveModel::Type::Helpers::AcceptsMultiparameterTime::InstanceMethods
1017
+
1018
+ def type; end
1019
+ def user_input_in_time_zone(value); end
1020
+
1021
+ private
1022
+
1023
+ def cast_value(value); end
1024
+ end
1025
+
1026
+ class ActiveModel::Type::Value
1027
+ def initialize(precision: T.unsafe(nil), limit: T.unsafe(nil), scale: T.unsafe(nil)); end
1028
+
1029
+ def ==(other); end
1030
+ def assert_valid_value(_); end
1031
+ def binary?; end
1032
+ def cast(value); end
1033
+ def changed?(old_value, new_value, _new_value_before_type_cast); end
1034
+ def changed_in_place?(raw_old_value, new_value); end
1035
+ def deserialize(value); end
1036
+ def eql?(other); end
1037
+ def force_equality?(_value); end
1038
+ def hash; end
1039
+ def limit; end
1040
+ def map(value); end
1041
+ def precision; end
1042
+ def scale; end
1043
+ def serializable?(value); end
1044
+ def serialize(value); end
1045
+ def type; end
1046
+ def type_cast_for_schema(value); end
1047
+ def value_constructed_by_mass_assignment?(_value); end
1048
+
1049
+ private
1050
+
1051
+ def cast_value(value); end
1052
+ end
1053
+
1054
+ class ActiveModel::UnknownAttributeError < ::NoMethodError
1055
+ def initialize(record, attribute); end
1056
+
1057
+ def attribute; end
1058
+ def record; end
1059
+ end
1060
+
1061
+ module ActiveModel::VERSION; end
1062
+ ActiveModel::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
1063
+ ActiveModel::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
1064
+ ActiveModel::VERSION::PRE = T.let(T.unsafe(nil), String)
1065
+ ActiveModel::VERSION::STRING = T.let(T.unsafe(nil), String)
1066
+ ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer)
1067
+
1068
+ class ActiveModel::ValidationError < ::StandardError
1069
+ def initialize(model); end
1070
+
1071
+ def model; end
1072
+ end
1073
+
1074
+ module ActiveModel::Validations
1075
+ extend ::ActiveSupport::Concern
1076
+ include ::ActiveSupport::Callbacks
1077
+ include ::ActiveModel::Validations::HelperMethods
1078
+
1079
+ mixes_in_class_methods ::ActiveModel::Validations::ClassMethods
1080
+ mixes_in_class_methods ::ActiveModel::Naming
1081
+ mixes_in_class_methods ::ActiveModel::Callbacks
1082
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
1083
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
1084
+ mixes_in_class_methods ::ActiveModel::Translation
1085
+ mixes_in_class_methods ::ActiveModel::Validations::HelperMethods
1086
+
1087
+ def errors; end
1088
+ def invalid?(context = T.unsafe(nil)); end
1089
+ def read_attribute_for_validation(*_arg0); end
1090
+ def valid?(context = T.unsafe(nil)); end
1091
+ def validate(context = T.unsafe(nil)); end
1092
+ def validate!(context = T.unsafe(nil)); end
1093
+ def validates_with(*args, &block); end
1094
+
1095
+ private
1096
+
1097
+ def initialize_dup(other); end
1098
+ def raise_validation_error; end
1099
+ def run_validations!; end
1100
+ end
1101
+
1102
+ class ActiveModel::Validations::AbsenceValidator < ::ActiveModel::EachValidator
1103
+ def validate_each(record, attr_name, value); end
1104
+ end
1105
+
1106
+ class ActiveModel::Validations::AcceptanceValidator < ::ActiveModel::EachValidator
1107
+ def initialize(options); end
1108
+
1109
+ def validate_each(record, attribute, value); end
1110
+
1111
+ private
1112
+
1113
+ def acceptable_option?(value); end
1114
+ def setup!(klass); end
1115
+ end
1116
+
1117
+ class ActiveModel::Validations::AcceptanceValidator::LazilyDefineAttributes < ::Module
1118
+ def initialize(attributes); end
1119
+
1120
+ def ==(other); end
1121
+ def define_on(klass); end
1122
+ def included(klass); end
1123
+ def matches?(method_name); end
1124
+
1125
+ protected
1126
+
1127
+ def attributes; end
1128
+ end
1129
+
1130
+ module ActiveModel::Validations::Callbacks
1131
+ extend ::ActiveSupport::Concern
1132
+ include ::ActiveSupport::Callbacks
1133
+
1134
+ mixes_in_class_methods ::ActiveModel::Validations::Callbacks::ClassMethods
1135
+ mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods
1136
+ mixes_in_class_methods ::ActiveSupport::DescendantsTracker
1137
+
1138
+ private
1139
+
1140
+ def run_validations!; end
1141
+ end
1142
+
1143
+ module ActiveModel::Validations::Callbacks::ClassMethods
1144
+ def after_validation(*args, &block); end
1145
+ def before_validation(*args, &block); end
1146
+
1147
+ private
1148
+
1149
+ def set_options_for_callback(options); end
1150
+ end
1151
+
1152
+ module ActiveModel::Validations::ClassMethods
1153
+ def attribute_method?(attribute); end
1154
+ def clear_validators!; end
1155
+ def inherited(base); end
1156
+ def validate(*args, &block); end
1157
+ def validates(*attributes); end
1158
+ def validates!(*attributes); end
1159
+ def validates_each(*attr_names, &block); end
1160
+ def validates_with(*args, &block); end
1161
+ def validators; end
1162
+ def validators_on(*attributes); end
1163
+
1164
+ private
1165
+
1166
+ def _parse_validates_options(options); end
1167
+ def _validates_default_keys; end
1168
+ end
1169
+
1170
+ ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array)
1171
+
1172
+ module ActiveModel::Validations::Clusivity
1173
+ def check_validity!; end
1174
+
1175
+ private
1176
+
1177
+ def delimiter; end
1178
+ def include?(record, value); end
1179
+ def inclusion_method(enumerable); end
1180
+ end
1181
+
1182
+ ActiveModel::Validations::Clusivity::ERROR_MESSAGE = T.let(T.unsafe(nil), String)
1183
+
1184
+ class ActiveModel::Validations::ConfirmationValidator < ::ActiveModel::EachValidator
1185
+ def initialize(options); end
1186
+
1187
+ def validate_each(record, attribute, value); end
1188
+
1189
+ private
1190
+
1191
+ def confirmation_value_equal?(record, attribute, value, confirmed); end
1192
+ def setup!(klass); end
1193
+ end
1194
+
1195
+ class ActiveModel::Validations::ExclusionValidator < ::ActiveModel::EachValidator
1196
+ include ::ActiveModel::Validations::Clusivity
1197
+
1198
+ def validate_each(record, attribute, value); end
1199
+ end
1200
+
1201
+ class ActiveModel::Validations::FormatValidator < ::ActiveModel::EachValidator
1202
+ def check_validity!; end
1203
+ def validate_each(record, attribute, value); end
1204
+
1205
+ private
1206
+
1207
+ def check_options_validity(name); end
1208
+ def option_call(record, name); end
1209
+ def record_error(record, attribute, name, value); end
1210
+ def regexp_using_multiline_anchors?(regexp); end
1211
+ end
1212
+
1213
+ module ActiveModel::Validations::HelperMethods
1214
+ def validates_absence_of(*attr_names); end
1215
+ def validates_acceptance_of(*attr_names); end
1216
+ def validates_confirmation_of(*attr_names); end
1217
+ def validates_exclusion_of(*attr_names); end
1218
+ def validates_format_of(*attr_names); end
1219
+ def validates_inclusion_of(*attr_names); end
1220
+ def validates_length_of(*attr_names); end
1221
+ def validates_numericality_of(*attr_names); end
1222
+ def validates_presence_of(*attr_names); end
1223
+ def validates_size_of(*attr_names); end
1224
+
1225
+ private
1226
+
1227
+ def _merge_attributes(attr_names); end
1228
+ end
1229
+
1230
+ class ActiveModel::Validations::InclusionValidator < ::ActiveModel::EachValidator
1231
+ include ::ActiveModel::Validations::Clusivity
1232
+
1233
+ def validate_each(record, attribute, value); end
1234
+ end
1235
+
1236
+ class ActiveModel::Validations::LengthValidator < ::ActiveModel::EachValidator
1237
+ def initialize(options); end
1238
+
1239
+ def check_validity!; end
1240
+ def validate_each(record, attribute, value); end
1241
+
1242
+ private
1243
+
1244
+ def skip_nil_check?(key); end
1245
+ end
1246
+
1247
+ ActiveModel::Validations::LengthValidator::CHECKS = T.let(T.unsafe(nil), Hash)
1248
+ ActiveModel::Validations::LengthValidator::MESSAGES = T.let(T.unsafe(nil), Hash)
1249
+ ActiveModel::Validations::LengthValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array)
1250
+
1251
+ class ActiveModel::Validations::NumericalityValidator < ::ActiveModel::EachValidator
1252
+ def check_validity!; end
1253
+ def validate_each(record, attr_name, value, precision: T.unsafe(nil), scale: T.unsafe(nil)); end
1254
+
1255
+ private
1256
+
1257
+ def allow_only_integer?(record); end
1258
+ def filtered_options(value); end
1259
+ def is_hexadecimal_literal?(raw_value); end
1260
+ def is_integer?(raw_value); end
1261
+ def is_number?(raw_value, precision, scale); end
1262
+ def parse_as_number(raw_value, precision, scale); end
1263
+ def parse_float(raw_value, precision, scale); end
1264
+ def prepare_value_for_validation(value, record, attr_name); end
1265
+ def record_attribute_changed_in_place?(record, attr_name); end
1266
+ def round(raw_value, scale); end
1267
+ end
1268
+
1269
+ ActiveModel::Validations::NumericalityValidator::CHECKS = T.let(T.unsafe(nil), Hash)
1270
+ ActiveModel::Validations::NumericalityValidator::HEXADECIMAL_REGEX = T.let(T.unsafe(nil), Regexp)
1271
+ ActiveModel::Validations::NumericalityValidator::INTEGER_REGEX = T.let(T.unsafe(nil), Regexp)
1272
+ ActiveModel::Validations::NumericalityValidator::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array)
1273
+
1274
+ class ActiveModel::Validations::PresenceValidator < ::ActiveModel::EachValidator
1275
+ def validate_each(record, attr_name, value); end
1276
+ end
1277
+
1278
+ class ActiveModel::Validations::WithValidator < ::ActiveModel::EachValidator
1279
+ def validate_each(record, attr, val); end
1280
+ end
1281
+
1282
+ class ActiveModel::Validator
1283
+ def initialize(options = T.unsafe(nil)); end
1284
+
1285
+ def kind; end
1286
+ def options; end
1287
+ def validate(record); end
1288
+
1289
+ class << self
1290
+ def kind; end
1291
+ end
1292
+ end