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
@@ -0,0 +1,509 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `base64` gem.
5
+ # Please instead update this file by running `bin/tapioca gem base64`.
6
+
7
+
8
+ # \Module \Base64 provides methods for:
9
+ #
10
+ # - Encoding a binary string (containing non-ASCII characters)
11
+ # as a string of printable ASCII characters.
12
+ # - Decoding such an encoded string.
13
+ #
14
+ # \Base64 is commonly used in contexts where binary data
15
+ # is not allowed or supported:
16
+ #
17
+ # - Images in HTML or CSS files, or in URLs.
18
+ # - Email attachments.
19
+ #
20
+ # A \Base64-encoded string is about one-third larger that its source.
21
+ # See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64]
22
+ # for more information.
23
+ #
24
+ # This module provides three pairs of encode/decode methods.
25
+ # Your choices among these methods should depend on:
26
+ #
27
+ # - Which character set is to be used for encoding and decoding.
28
+ # - Whether "padding" is to be used.
29
+ # - Whether encoded strings are to contain newlines.
30
+ #
31
+ # Note: Examples on this page assume that the including program has executed:
32
+ #
33
+ # require 'base64'
34
+ #
35
+ # == Encoding Character Sets
36
+ #
37
+ # A \Base64-encoded string consists only of characters from a 64-character set:
38
+ #
39
+ # - <tt>('A'..'Z')</tt>.
40
+ # - <tt>('a'..'z')</tt>.
41
+ # - <tt>('0'..'9')</tt>.
42
+ # - <tt>=</tt>, the 'padding' character.
43
+ # - Either:
44
+ # - <tt>%w[+ /]</tt>:
45
+ # {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045];
46
+ # _not_ safe for URLs.
47
+ # - <tt>%w[- _]</tt>:
48
+ # {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648];
49
+ # safe for URLs.
50
+ #
51
+ # If you are working with \Base64-encoded strings that will come from
52
+ # or be put into URLs, you should choose this encoder-decoder pair
53
+ # of RFC-4648-compliant methods:
54
+ #
55
+ # - Base64.urlsafe_encode64 and Base64.urlsafe_decode64.
56
+ #
57
+ # Otherwise, you may choose any of the pairs in this module,
58
+ # including the pair above, or the RFC-2045-compliant pairs:
59
+ #
60
+ # - Base64.encode64 and Base64.decode64.
61
+ # - Base64.strict_encode64 and Base64.strict_decode64.
62
+ #
63
+ # == Padding
64
+ #
65
+ # \Base64-encoding changes a triplet of input bytes
66
+ # into a quartet of output characters.
67
+ #
68
+ # <b>Padding in Encode Methods</b>
69
+ #
70
+ # Padding -- extending an encoded string with zero, one, or two trailing
71
+ # <tt>=</tt> characters -- is performed by methods Base64.encode64,
72
+ # Base64.strict_encode64, and, by default, Base64.urlsafe_encode64:
73
+ #
74
+ # Base64.encode64('s') # => "cw==\n"
75
+ # Base64.strict_encode64('s') # => "cw=="
76
+ # Base64.urlsafe_encode64('s') # => "cw=="
77
+ # Base64.urlsafe_encode64('s', padding: false) # => "cw"
78
+ #
79
+ # When padding is performed, the encoded string is always of length <em>4n</em>,
80
+ # where +n+ is a non-negative integer:
81
+ #
82
+ # - Input bytes of length <em>3n</em> generate unpadded output characters
83
+ # of length <em>4n</em>:
84
+ #
85
+ # # n = 1: 3 bytes => 4 characters.
86
+ # Base64.strict_encode64('123') # => "MDEy"
87
+ # # n = 2: 6 bytes => 8 characters.
88
+ # Base64.strict_encode64('123456') # => "MDEyMzQ1"
89
+ #
90
+ # - Input bytes of length <em>3n+1</em> generate padded output characters
91
+ # of length <em>4(n+1)</em>, with two padding characters at the end:
92
+ #
93
+ # # n = 1: 4 bytes => 8 characters.
94
+ # Base64.strict_encode64('1234') # => "MDEyMw=="
95
+ # # n = 2: 7 bytes => 12 characters.
96
+ # Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng=="
97
+ #
98
+ # - Input bytes of length <em>3n+2</em> generate padded output characters
99
+ # of length <em>4(n+1)</em>, with one padding character at the end:
100
+ #
101
+ # # n = 1: 5 bytes => 8 characters.
102
+ # Base64.strict_encode64('12345') # => "MDEyMzQ="
103
+ # # n = 2: 8 bytes => 12 characters.
104
+ # Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc="
105
+ #
106
+ # When padding is suppressed, for a positive integer <em>n</em>:
107
+ #
108
+ # - Input bytes of length <em>3n</em> generate unpadded output characters
109
+ # of length <em>4n</em>:
110
+ #
111
+ # # n = 1: 3 bytes => 4 characters.
112
+ # Base64.urlsafe_encode64('123', padding: false) # => "MDEy"
113
+ # # n = 2: 6 bytes => 8 characters.
114
+ # Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1"
115
+ #
116
+ # - Input bytes of length <em>3n+1</em> generate unpadded output characters
117
+ # of length <em>4n+2</em>, with two padding characters at the end:
118
+ #
119
+ # # n = 1: 4 bytes => 6 characters.
120
+ # Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw"
121
+ # # n = 2: 7 bytes => 10 characters.
122
+ # Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng"
123
+ #
124
+ # - Input bytes of length <em>3n+2</em> generate unpadded output characters
125
+ # of length <em>4n+3</em>, with one padding character at the end:
126
+ #
127
+ # # n = 1: 5 bytes => 7 characters.
128
+ # Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ"
129
+ # # m = 2: 8 bytes => 11 characters.
130
+ # Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc"
131
+ #
132
+ # <b>Padding in Decode Methods</b>
133
+ #
134
+ # All of the \Base64 decode methods support (but do not require) padding.
135
+ #
136
+ # \Method Base64.decode64 does not check the size of the padding:
137
+ #
138
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
139
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
140
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
141
+ #
142
+ # \Method Base64.strict_decode64 strictly enforces padding size:
143
+ #
144
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
145
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
146
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
147
+ #
148
+ # \Method Base64.urlsafe_decode64 allows padding in +str+,
149
+ # which if present, must be correct:
150
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
151
+ #
152
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
153
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
154
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
155
+ #
156
+ # == Newlines
157
+ #
158
+ # An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64
159
+ # has an embedded newline character
160
+ # after each 60-character sequence, and, if non-empty, at the end:
161
+ #
162
+ # # No newline if empty.
163
+ # encoded = Base64.encode64("\x00" * 0)
164
+ # encoded.index("\n") # => nil
165
+ #
166
+ # # Newline at end of short output.
167
+ # encoded = Base64.encode64("\x00" * 1)
168
+ # encoded.size # => 4
169
+ # encoded.index("\n") # => 4
170
+ #
171
+ # # Newline at end of longer output.
172
+ # encoded = Base64.encode64("\x00" * 45)
173
+ # encoded.size # => 60
174
+ # encoded.index("\n") # => 60
175
+ #
176
+ # # Newlines embedded and at end of still longer output.
177
+ # encoded = Base64.encode64("\x00" * 46)
178
+ # encoded.size # => 65
179
+ # encoded.rindex("\n") # => 65
180
+ # encoded.split("\n").map {|s| s.size } # => [60, 4]
181
+ #
182
+ # The string to be encoded may itself contain newlines,
183
+ # which are encoded as \Base64:
184
+ #
185
+ # # Base64.encode64("\n\n\n") # => "CgoK\n"
186
+ # s = "This is line 1\nThis is line 2\n"
187
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
188
+ #
189
+ # source://base64//lib/base64.rb#184
190
+ module Base64
191
+ private
192
+
193
+ # Returns a string containing the decoding of an RFC-2045-compliant
194
+ # \Base64-encoded string +str+:
195
+ #
196
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
197
+ # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
198
+ #
199
+ # Non-\Base64 characters in +str+ are ignored;
200
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
201
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
202
+ #
203
+ # Base64.decode64("\x00\n-_") # => ""
204
+ #
205
+ # Padding in +str+ (even if incorrect) is ignored:
206
+ #
207
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
208
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
209
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
210
+ #
211
+ # source://base64//lib/base64.rb#241
212
+ def decode64(str); end
213
+
214
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
215
+ #
216
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
217
+ # <tt>+</tt> or <tt>/</tt>;
218
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
219
+ #
220
+ # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
221
+ # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
222
+ #
223
+ # The returned string may include padding;
224
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
225
+ #
226
+ # Base64.encode64('*') # => "Kg==\n"
227
+ #
228
+ # The returned string ends with a newline character, and if sufficiently long
229
+ # will have one or more embedded newline characters;
230
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
231
+ #
232
+ # Base64.encode64('*') # => "Kg==\n"
233
+ # Base64.encode64('*' * 46)
234
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
235
+ #
236
+ # The string to be encoded may itself contain newlines,
237
+ # which will be encoded as ordinary \Base64:
238
+ #
239
+ # Base64.encode64("\n\n\n") # => "CgoK\n"
240
+ # s = "This is line 1\nThis is line 2\n"
241
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
242
+ #
243
+ # source://base64//lib/base64.rb#219
244
+ def encode64(bin); end
245
+
246
+ # Returns a string containing the decoding of an RFC-2045-compliant
247
+ # \Base64-encoded string +str+:
248
+ #
249
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
250
+ # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
251
+ #
252
+ # Non-\Base64 characters in +str+ not allowed;
253
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
254
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
255
+ #
256
+ # Base64.strict_decode64("\n") # Raises ArgumentError
257
+ # Base64.strict_decode64('-') # Raises ArgumentError
258
+ # Base64.strict_decode64('_') # Raises ArgumentError
259
+ #
260
+ # Padding in +str+, if present, must be correct:
261
+ #
262
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
263
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
264
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
265
+ #
266
+ # source://base64//lib/base64.rb#297
267
+ def strict_decode64(str); end
268
+
269
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
270
+ #
271
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
272
+ # <tt>+</tt> or <tt>/</tt>;
273
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
274
+ #
275
+ # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
276
+ # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
277
+ #
278
+ # The returned string may include padding;
279
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
280
+ #
281
+ # Base64.strict_encode64('*') # => "Kg==\n"
282
+ #
283
+ # The returned string will have no newline characters, regardless of its length;
284
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
285
+ #
286
+ # Base64.strict_encode64('*') # => "Kg=="
287
+ # Base64.strict_encode64('*' * 46)
288
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
289
+ #
290
+ # The string to be encoded may itself contain newlines,
291
+ # which will be encoded as ordinary \Base64:
292
+ #
293
+ # Base64.strict_encode64("\n\n\n") # => "CgoK"
294
+ # s = "This is line 1\nThis is line 2\n"
295
+ # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
296
+ #
297
+ # source://base64//lib/base64.rb#273
298
+ def strict_encode64(bin); end
299
+
300
+ # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
301
+ #
302
+ # +str+ may not contain non-Base64 characters;
303
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
304
+ #
305
+ # Base64.urlsafe_decode64('+') # Raises ArgumentError.
306
+ # Base64.urlsafe_decode64('/') # Raises ArgumentError.
307
+ # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
308
+ #
309
+ # Padding in +str+, if present, must be correct:
310
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
311
+ #
312
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
313
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
314
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
315
+ #
316
+ # source://base64//lib/base64.rb#351
317
+ def urlsafe_decode64(str); end
318
+
319
+ # Returns the RFC-4648-compliant \Base64-encoding of +bin+.
320
+ #
321
+ # Per RFC 4648, the returned string will not contain the URL-unsafe characters
322
+ # <tt>+</tt> or <tt>/</tt>,
323
+ # but instead may contain the URL-safe characters
324
+ # <tt>-</tt> and <tt>_</tt>;
325
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
326
+ #
327
+ # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
328
+ # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
329
+ #
330
+ # By default, the returned string may have padding;
331
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
332
+ #
333
+ # Base64.urlsafe_encode64('*') # => "Kg=="
334
+ #
335
+ # Optionally, you can suppress padding:
336
+ #
337
+ # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
338
+ #
339
+ # The returned string will have no newline characters, regardless of its length;
340
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
341
+ #
342
+ # Base64.urlsafe_encode64('*') # => "Kg=="
343
+ # Base64.urlsafe_encode64('*' * 46)
344
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
345
+ #
346
+ # source://base64//lib/base64.rb#328
347
+ def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
348
+
349
+ class << self
350
+ # Returns a string containing the decoding of an RFC-2045-compliant
351
+ # \Base64-encoded string +str+:
352
+ #
353
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
354
+ # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
355
+ #
356
+ # Non-\Base64 characters in +str+ are ignored;
357
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
358
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
359
+ #
360
+ # Base64.decode64("\x00\n-_") # => ""
361
+ #
362
+ # Padding in +str+ (even if incorrect) is ignored:
363
+ #
364
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
365
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
366
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
367
+ #
368
+ # source://base64//lib/base64.rb#241
369
+ def decode64(str); end
370
+
371
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
372
+ #
373
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
374
+ # <tt>+</tt> or <tt>/</tt>;
375
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
376
+ #
377
+ # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
378
+ # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
379
+ #
380
+ # The returned string may include padding;
381
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
382
+ #
383
+ # Base64.encode64('*') # => "Kg==\n"
384
+ #
385
+ # The returned string ends with a newline character, and if sufficiently long
386
+ # will have one or more embedded newline characters;
387
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
388
+ #
389
+ # Base64.encode64('*') # => "Kg==\n"
390
+ # Base64.encode64('*' * 46)
391
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
392
+ #
393
+ # The string to be encoded may itself contain newlines,
394
+ # which will be encoded as ordinary \Base64:
395
+ #
396
+ # Base64.encode64("\n\n\n") # => "CgoK\n"
397
+ # s = "This is line 1\nThis is line 2\n"
398
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
399
+ #
400
+ # source://base64//lib/base64.rb#219
401
+ def encode64(bin); end
402
+
403
+ # Returns a string containing the decoding of an RFC-2045-compliant
404
+ # \Base64-encoded string +str+:
405
+ #
406
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
407
+ # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
408
+ #
409
+ # Non-\Base64 characters in +str+ not allowed;
410
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
411
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
412
+ #
413
+ # Base64.strict_decode64("\n") # Raises ArgumentError
414
+ # Base64.strict_decode64('-') # Raises ArgumentError
415
+ # Base64.strict_decode64('_') # Raises ArgumentError
416
+ #
417
+ # Padding in +str+, if present, must be correct:
418
+ #
419
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
420
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
421
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
422
+ #
423
+ # source://base64//lib/base64.rb#297
424
+ def strict_decode64(str); end
425
+
426
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
427
+ #
428
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
429
+ # <tt>+</tt> or <tt>/</tt>;
430
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
431
+ #
432
+ # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
433
+ # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
434
+ #
435
+ # The returned string may include padding;
436
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
437
+ #
438
+ # Base64.strict_encode64('*') # => "Kg==\n"
439
+ #
440
+ # The returned string will have no newline characters, regardless of its length;
441
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
442
+ #
443
+ # Base64.strict_encode64('*') # => "Kg=="
444
+ # Base64.strict_encode64('*' * 46)
445
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
446
+ #
447
+ # The string to be encoded may itself contain newlines,
448
+ # which will be encoded as ordinary \Base64:
449
+ #
450
+ # Base64.strict_encode64("\n\n\n") # => "CgoK"
451
+ # s = "This is line 1\nThis is line 2\n"
452
+ # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
453
+ #
454
+ # source://base64//lib/base64.rb#273
455
+ def strict_encode64(bin); end
456
+
457
+ # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
458
+ #
459
+ # +str+ may not contain non-Base64 characters;
460
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
461
+ #
462
+ # Base64.urlsafe_decode64('+') # Raises ArgumentError.
463
+ # Base64.urlsafe_decode64('/') # Raises ArgumentError.
464
+ # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
465
+ #
466
+ # Padding in +str+, if present, must be correct:
467
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
468
+ #
469
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
470
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
471
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
472
+ #
473
+ # source://base64//lib/base64.rb#351
474
+ def urlsafe_decode64(str); end
475
+
476
+ # Returns the RFC-4648-compliant \Base64-encoding of +bin+.
477
+ #
478
+ # Per RFC 4648, the returned string will not contain the URL-unsafe characters
479
+ # <tt>+</tt> or <tt>/</tt>,
480
+ # but instead may contain the URL-safe characters
481
+ # <tt>-</tt> and <tt>_</tt>;
482
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
483
+ #
484
+ # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
485
+ # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
486
+ #
487
+ # By default, the returned string may have padding;
488
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
489
+ #
490
+ # Base64.urlsafe_encode64('*') # => "Kg=="
491
+ #
492
+ # Optionally, you can suppress padding:
493
+ #
494
+ # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
495
+ #
496
+ # The returned string will have no newline characters, regardless of its length;
497
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
498
+ #
499
+ # Base64.urlsafe_encode64('*') # => "Kg=="
500
+ # Base64.urlsafe_encode64('*' * 46)
501
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
502
+ #
503
+ # source://base64//lib/base64.rb#328
504
+ def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
505
+ end
506
+ end
507
+
508
+ # source://base64//lib/base64.rb#186
509
+ Base64::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,78 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `bigdecimal` gem.
5
+ # Please instead update this file by running `bin/tapioca gem bigdecimal`.
6
+
7
+
8
+ # source://bigdecimal//lib/bigdecimal/util.rb#78
9
+ class BigDecimal < ::Numeric
10
+ # call-seq:
11
+ # a.to_d -> bigdecimal
12
+ #
13
+ # Returns self.
14
+ #
15
+ # require 'bigdecimal/util'
16
+ #
17
+ # d = BigDecimal("3.14")
18
+ # d.to_d # => 0.314e1
19
+ #
20
+ # source://bigdecimal//lib/bigdecimal/util.rb#110
21
+ def to_d; end
22
+
23
+ # call-seq:
24
+ # a.to_digits -> string
25
+ #
26
+ # Converts a BigDecimal to a String of the form "nnnnnn.mmm".
27
+ # This method is deprecated; use BigDecimal#to_s("F") instead.
28
+ #
29
+ # require 'bigdecimal/util'
30
+ #
31
+ # d = BigDecimal("3.14")
32
+ # d.to_digits # => "3.14"
33
+ #
34
+ # source://bigdecimal//lib/bigdecimal/util.rb#90
35
+ def to_digits; end
36
+ end
37
+
38
+ BigDecimal::VERSION = T.let(T.unsafe(nil), String)
39
+
40
+ # source://bigdecimal//lib/bigdecimal/util.rb#138
41
+ class Complex < ::Numeric
42
+ # call-seq:
43
+ # cmp.to_d -> bigdecimal
44
+ # cmp.to_d(precision) -> bigdecimal
45
+ #
46
+ # Returns the value as a BigDecimal.
47
+ #
48
+ # The +precision+ parameter is required for a rational complex number.
49
+ # This parameter is used to determine the number of significant digits
50
+ # for the result.
51
+ #
52
+ # require 'bigdecimal'
53
+ # require 'bigdecimal/util'
54
+ #
55
+ # Complex(0.1234567, 0).to_d(4) # => 0.1235e0
56
+ # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
57
+ #
58
+ # See also Kernel.BigDecimal.
59
+ #
60
+ # source://bigdecimal//lib/bigdecimal/util.rb#157
61
+ def to_d(*args); end
62
+ end
63
+
64
+ # source://bigdecimal//lib/bigdecimal/util.rb#171
65
+ class NilClass
66
+ # call-seq:
67
+ # nil.to_d -> bigdecimal
68
+ #
69
+ # Returns nil represented as a BigDecimal.
70
+ #
71
+ # require 'bigdecimal'
72
+ # require 'bigdecimal/util'
73
+ #
74
+ # nil.to_d # => 0.0
75
+ #
76
+ # source://bigdecimal//lib/bigdecimal/util.rb#182
77
+ def to_d; end
78
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `builder` gem.
5
+ # Please instead update this file by running `bin/tapioca gem builder`.
6
+
7
+
8
+ # THIS IS AN EMPTY RBI FILE.
9
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem