konstruo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/.tool-versions +1 -0
  5. data/CHANGELOG.md +21 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +35 -0
  8. data/Rakefile +10 -0
  9. data/lib/konstruo/mapper.rb +120 -0
  10. data/lib/konstruo/version.rb +6 -0
  11. data/lib/konstruo.rb +18 -0
  12. data/sorbet/config +4 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  15. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  16. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  17. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +454 -0
  21. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  22. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  23. data/sorbet/rbi/annotations/railties.rbi +61 -0
  24. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  25. data/sorbet/rbi/dsl/.gitattributes +1 -0
  26. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  27. data/sorbet/rbi/gems/.gitattributes +1 -0
  28. data/sorbet/rbi/gems/actioncable@7.2.1.rbi +3096 -0
  29. data/sorbet/rbi/gems/actionmailbox@7.2.1.rbi +1832 -0
  30. data/sorbet/rbi/gems/actionmailer@7.2.1.rbi +2664 -0
  31. data/sorbet/rbi/gems/actionpack@7.2.1.rbi +20536 -0
  32. data/sorbet/rbi/gems/actiontext@7.2.1.rbi +1697 -0
  33. data/sorbet/rbi/gems/actionview@7.2.1.rbi +15752 -0
  34. data/sorbet/rbi/gems/activejob@7.2.1.rbi +2828 -0
  35. data/sorbet/rbi/gems/activemodel@7.2.1.rbi +6762 -0
  36. data/sorbet/rbi/gems/activerecord@7.2.1.rbi +41433 -0
  37. data/sorbet/rbi/gems/activestorage@7.2.1.rbi +3247 -0
  38. data/sorbet/rbi/gems/activesupport@7.2.1.rbi +21142 -0
  39. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  40. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  41. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +78 -0
  42. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  43. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +11645 -0
  44. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  45. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  46. data/sorbet/rbi/gems/dashbrains-rubocop-config@1.0.4.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +75 -0
  48. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  49. data/sorbet/rbi/gems/drb@2.2.1.rbi +1347 -0
  50. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +749 -0
  52. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2359 -0
  53. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  54. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  55. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  56. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  57. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1081 -0
  58. data/sorbet/rbi/gems/mail@2.8.1.rbi +8658 -0
  59. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  60. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  61. data/sorbet/rbi/gems/minitest@5.25.1.rbi +1546 -0
  62. data/sorbet/rbi/gems/net-imap@0.4.16.rbi +10845 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +1228 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +293 -0
  68. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  69. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  70. data/sorbet/rbi/gems/parser@3.3.5.0.rbi +5519 -0
  71. data/sorbet/rbi/gems/prism@1.0.0.rbi +35493 -0
  72. data/sorbet/rbi/gems/psych@5.1.2.rbi +1769 -0
  73. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  74. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +727 -0
  75. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +747 -0
  76. data/sorbet/rbi/gems/rack@3.1.7.rbi +4902 -0
  77. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  78. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +758 -0
  79. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +785 -0
  80. data/sorbet/rbi/gems/rails@7.2.1.rbi +9 -0
  81. data/sorbet/rbi/gems/railties@7.2.1.rbi +3824 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  83. data/sorbet/rbi/gems/rake@13.2.1.rbi +3046 -0
  84. data/sorbet/rbi/gems/rbi@0.2.0.rbi +4105 -0
  85. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12721 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  87. data/sorbet/rbi/gems/reline@0.5.10.rbi +9 -0
  88. data/sorbet/rbi/gems/rspec-core@3.13.1.rbi +11012 -0
  89. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  90. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  91. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  92. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  93. data/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi +7446 -0
  94. data/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi +9 -0
  95. data/sorbet/rbi/gems/rubocop-factory_bot@2.26.1.rbi +9 -0
  96. data/sorbet/rbi/gems/rubocop-graphql@1.5.4.rbi +9 -0
  97. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +9 -0
  98. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  99. data/sorbet/rbi/gems/rubocop-rails@2.26.1.rbi +9 -0
  100. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  101. data/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi +9 -0
  102. data/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi +9 -0
  103. data/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +9 -0
  104. data/sorbet/rbi/gems/rubocop@1.66.1.rbi +58268 -0
  105. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  106. data/sorbet/rbi/gems/securerandom@0.3.1.rbi +396 -0
  107. data/sorbet/rbi/gems/spoom@1.4.2.rbi +4932 -0
  108. data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
  109. data/sorbet/rbi/gems/tapioca@0.16.2.rbi +3581 -0
  110. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  111. data/sorbet/rbi/gems/timeout@0.4.1.rbi +149 -0
  112. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  113. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  114. data/sorbet/rbi/gems/useragent@0.16.10.rbi +9 -0
  115. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +993 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +121 -0
  118. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  119. data/sorbet/rbi/gems/yard@0.9.37.rbi +18570 -0
  120. data/sorbet/rbi/gems/zeitwerk@2.6.18.rbi +1051 -0
  121. data/sorbet/rbi/todo.rbi +6 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +9 -0
  124. data/tasks/bundle_update.rake +14 -0
  125. data/tasks/sorbet.rake +26 -0
  126. metadata +216 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 82cd416f817c8424130e4182e09d8c2c0a9d4979a97a71fc531ffbc036b10e6a
4
+ data.tar.gz: 742b273c82e12635323774d81227bf5c6a3d09703de7c7404e54ac216a412b6d
5
+ SHA512:
6
+ metadata.gz: 3b27eea27738c42c84915369cd87bc0c5c8b1e1b3c58081a94c44e78b14fbf135b7cbbb6637c2871c823c093bcc7727b6326585482470a988d6effe20bbf10d0
7
+ data.tar.gz: a6b7265f940a38df454ad25994f1f612828a36dba936cb0291a7cad373deb778ead96709a4a553474f5efde2686a1b7b185da1a11bf0c444bce14bb1ea0a074f
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ inherit_gem:
2
+ dashbrains-rubocop-config:
3
+ - rubocop.yml
4
+ require:
5
+ - rubocop-rake
6
+
7
+ AllCops:
8
+ DisplayCopNames: true
9
+ DisplayStyleGuide: true
10
+ NewCops: enable
11
+ TargetRubyVersion: <%= RUBY_VERSION[/\d+\.\d+/] %>
12
+ Exclude:
13
+ - "bin/*"
14
+ - db/schema.rb
15
+ - "node_modules/**/*"
16
+ - "tmp/**/*"
17
+ - "vendor/**/*"
18
+ UseCache: true
19
+ CacheRootDirectory: "tmp/cache/rubocop"
20
+
21
+ Rails/RakeEnvironment:
22
+ Enabled: false
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.3.5
data/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2024-09-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * add jruby ([e3a5eb1](https://github.com/DashBrains/konstruo/commit/e3a5eb11eba0f932611e1d6871679b2942da51aa))
9
+ * add konstruo mapper ([e285212](https://github.com/DashBrains/konstruo/commit/e285212a6ebc861a7ca0b8f297dc2002dfe95789))
10
+ * add matrix ([470d501](https://github.com/DashBrains/konstruo/commit/470d50167820def2a1a508a5388bfb7f214c1b1d))
11
+ * add rspec ([96d61e5](https://github.com/DashBrains/konstruo/commit/96d61e5dc2068e40034666c8eda74c882d0d4539))
12
+ * **dev:** add bundler audit ([f5fb9ab](https://github.com/DashBrains/konstruo/commit/f5fb9ab4b460d33d0aac2f39a7cdde5fbc8252b2))
13
+ * initialize project ([e2619b0](https://github.com/DashBrains/konstruo/commit/e2619b0f2562bcf5e3b23b9b60ba385c7aa4257d))
14
+ * remove unsupported ruby ([33fefe7](https://github.com/DashBrains/konstruo/commit/33fefe73013b9a217a4b8d3872ce2e374cb10b8e))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **ci:** action reference ([7f784d3](https://github.com/DashBrains/konstruo/commit/7f784d3ac142680f93afc4ca1b10066dd0d19b70))
20
+
21
+ ## Changelog
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 frederic2ec
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Konstruo
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/konstruo`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/konstruo.
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ Dir['tasks/**/*.rake'].each { |t| load t }
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ task default: :spec
@@ -0,0 +1,120 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require 'active_support/all'
5
+ require 'action_controller'
6
+
7
+ module Konstruo
8
+ class Mapper
9
+ extend T::Sig
10
+
11
+ # Class variable to store field definitions
12
+ @fields = T.let([], T::Array[T::Hash[Symbol, T.untyped]])
13
+
14
+ class << self
15
+ extend T::Sig
16
+
17
+ sig { returns(T::Array[T::Hash[Symbol, T.untyped]]) }
18
+ attr_reader :fields
19
+ end
20
+
21
+ sig do
22
+ params(name: Symbol, type: T.any(T.class_of(Object), T::Array[T.class_of(Object)]), required: T::Boolean,
23
+ custom_name: T.nilable(String), mapper: T.nilable(T.proc.params(value: T.untyped).returns(T.untyped)),
24
+ error_message: T.nilable(String)).void
25
+ end
26
+ def self.field(name, type, required: false, custom_name: nil, mapper: nil, error_message: nil)
27
+ # Check if the attribute is already defined
28
+ attr_accessor name unless method_defined?(name)
29
+
30
+ @fields ||= [] if @fields.nil?
31
+ @fields << { name:, type:, required:, custom_name: custom_name || name.to_s, mapper:, error_message: }
32
+ end
33
+
34
+ sig { params(json_string: String).returns(T.attached_class) }
35
+ def self.from_json(json_string)
36
+ hash = JSON.parse(json_string)
37
+ new.from_hash(hash)
38
+ end
39
+
40
+ sig { params(params: ActionController::Parameters).returns(T.attached_class) }
41
+ def self.from_params(params)
42
+ hash = params.to_unsafe_h
43
+ new.from_hash(hash)
44
+ end
45
+
46
+ sig { params(hash: T::Hash[Symbol, T.untyped]).returns(T.attached_class) }
47
+ def self.from_hash(hash)
48
+ new.from_hash(hash)
49
+ end
50
+
51
+ sig { params(hash: T::Hash[Symbol, T.untyped]).returns(T.self_type) }
52
+ def from_hash(hash)
53
+ self.class.fields.each do |field|
54
+ key = field[:custom_name]
55
+ value = hash[key.to_s] || hash[key.to_sym]
56
+
57
+ if value.nil?
58
+ raise Konstruo::ValidationError, (field[:error_message] || "Missing required field: #{key}") if field[:required]
59
+ else
60
+ assign_value(field[:name], field[:type], value, field[:mapper], field[:error_message])
61
+ end
62
+ end
63
+ self
64
+ end
65
+
66
+ private
67
+
68
+ sig do
69
+ params(field_name: Symbol, field_type: T.any(T.class_of(Object), T::Array[T.class_of(Object)]), value: T.untyped, mapper: T.nilable(T.proc.params(value: T.untyped).returns(T.untyped)),
70
+ error_message: T.nilable(String)).void
71
+ end
72
+ def assign_value(field_name, field_type, value, mapper = nil, error_message = nil)
73
+ value = mapper.call(value) if mapper
74
+
75
+ if field_type.is_a?(Array)
76
+ # Check if the value is an array
77
+ raise Konstruo::ValidationError, (error_message || "Expected Array for field: #{field_name}, got #{value.class}") unless value.is_a?(Array)
78
+
79
+ # Validate each element in the array
80
+ element_type = field_type.first
81
+
82
+ validated_array = value.map.with_index do |element, index|
83
+ if T.must(element_type) < Konstruo::Mapper
84
+ # If it's a nested AutoMapper object, recursively map it
85
+ T.cast(element_type, T.class_of(Konstruo::Mapper)).new.from_hash(element)
86
+ else
87
+ # Validate individual element types
88
+ validate_type!(element, T.must(element_type), "#{field_name}[#{index}]", error_message)
89
+ element
90
+ end
91
+ end
92
+
93
+ send(:"#{field_name}=", validated_array)
94
+ elsif field_type < Konstruo::Mapper
95
+ send(:"#{field_name}=", field_type.new.from_hash(value))
96
+ else
97
+ validate_type!(value, field_type, field_name, error_message)
98
+ send(:"#{field_name}=", value)
99
+ end
100
+ end
101
+
102
+ sig do
103
+ params(
104
+ value: T.untyped,
105
+ expected_type: T.any(T.class_of(Object), T::Array[T.class_of(Object)]),
106
+ field_name: T.any(Symbol, String),
107
+ error_message: T.nilable(String)
108
+ ).void
109
+ end
110
+ def validate_type!(value, expected_type, field_name, error_message = nil)
111
+ # Custom handling for Boolean type
112
+ if expected_type == Konstruo::Boolean
113
+ raise Konstruo::ValidationError, (error_message || "Expected Boolean for field: #{field_name}, got #{value.class}") unless value.is_a?(TrueClass) || value.is_a?(FalseClass)
114
+ else
115
+ # Fallback to is_a? for runtime type checking if Sorbet is not available
116
+ raise Konstruo::ValidationError, (error_message || "Expected #{expected_type} for field: #{field_name}, got #{value.class}") unless value.is_a?(expected_type)
117
+ end
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,6 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ module Konstruo
5
+ VERSION = '1.0.0'
6
+ end
data/lib/konstruo.rb ADDED
@@ -0,0 +1,18 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require 'sorbet-runtime'
5
+ require_relative 'konstruo/version'
6
+
7
+ module Konstruo
8
+ class ValidationError < StandardError; end
9
+
10
+ class Boolean
11
+ extend T::Sig
12
+
13
+ sig { params(value: T.untyped).returns(Boolean) }
14
+ def self.boolean?(value)
15
+ value.is_a?(TrueClass) || value.is_a?(FalseClass)
16
+ end
17
+ end
18
+ end
data/sorbet/config ADDED
@@ -0,0 +1,4 @@
1
+ --dir
2
+ .
3
+ --ignore=tmp/
4
+ --ignore=vendor/
@@ -0,0 +1 @@
1
+ **/*.rbi linguist-vendored=true
@@ -0,0 +1,10 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActionMailer::Base
8
+ sig { params(headers: T.untyped, block: T.nilable(T.proc.params(arg0: ActionMailer::Collector).void)).returns(Mail::Message) }
9
+ def mail(headers = nil, &block); end
10
+ end