lunchmoney 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.github/dependabot.yml +18 -0
  4. data/.github/workflows/build_and_publish_yard_docs.yml +47 -0
  5. data/.github/workflows/ci.yml +58 -0
  6. data/.github/workflows/dependabot-rbi-updater.yml +43 -0
  7. data/.github/workflows/publish_gem.yml +31 -0
  8. data/.gitignore +62 -0
  9. data/.rubocop.yml +45 -0
  10. data/.ruby-version +1 -0
  11. data/.toys/.toys.rb +10 -0
  12. data/.toys/ci.rb +22 -0
  13. data/.toys/rbi.rb +60 -0
  14. data/.toys/rubocop.rb +10 -0
  15. data/.toys/spoom.rb +15 -0
  16. data/.toys/typecheck.rb +5 -0
  17. data/.yardopts +2 -0
  18. data/Appraisals +22 -0
  19. data/Gemfile +25 -0
  20. data/Gemfile.lock +174 -0
  21. data/LICENSE +21 -0
  22. data/README.md +57 -0
  23. data/bin/console +16 -0
  24. data/bin/rubocop +27 -0
  25. data/bin/setup +8 -0
  26. data/bin/spoom +27 -0
  27. data/bin/srb +27 -0
  28. data/bin/tapioca +27 -0
  29. data/bin/toys +27 -0
  30. data/bin/yard +27 -0
  31. data/lib/lunchmoney/api.rb +147 -0
  32. data/lib/lunchmoney/api_call.rb +109 -0
  33. data/lib/lunchmoney/assets/asset.rb +89 -0
  34. data/lib/lunchmoney/assets/asset_calls.rb +96 -0
  35. data/lib/lunchmoney/budget/budget.rb +74 -0
  36. data/lib/lunchmoney/budget/budget_calls.rb +82 -0
  37. data/lib/lunchmoney/budget/config.rb +38 -0
  38. data/lib/lunchmoney/budget/data.rb +42 -0
  39. data/lib/lunchmoney/categories/category/category.rb +52 -0
  40. data/lib/lunchmoney/categories/category/child_category.rb +42 -0
  41. data/lib/lunchmoney/categories/category_calls.rb +195 -0
  42. data/lib/lunchmoney/configuration.rb +26 -0
  43. data/lib/lunchmoney/crypto/crypto/crypto.rb +43 -0
  44. data/lib/lunchmoney/crypto/crypto/crypto_base.rb +65 -0
  45. data/lib/lunchmoney/crypto/crypto_calls.rb +49 -0
  46. data/lib/lunchmoney/data_object.rb +25 -0
  47. data/lib/lunchmoney/errors.rb +19 -0
  48. data/lib/lunchmoney/exceptions.rb +19 -0
  49. data/lib/lunchmoney/plaid_accounts/plaid_account.rb +73 -0
  50. data/lib/lunchmoney/plaid_accounts/plaid_account_calls.rb +38 -0
  51. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense.rb +65 -0
  52. data/lib/lunchmoney/recurring_expenses/recurring_expense/recurring_expense_base.rb +29 -0
  53. data/lib/lunchmoney/recurring_expenses/recurring_expense_calls.rb +28 -0
  54. data/lib/lunchmoney/tags/tag/tag.rb +20 -0
  55. data/lib/lunchmoney/tags/tag/tag_base.rb +21 -0
  56. data/lib/lunchmoney/tags/tag_calls.rb +20 -0
  57. data/lib/lunchmoney/transactions/transaction/child_transaction.rb +31 -0
  58. data/lib/lunchmoney/transactions/transaction/split.rb +24 -0
  59. data/lib/lunchmoney/transactions/transaction/transaction.rb +156 -0
  60. data/lib/lunchmoney/transactions/transaction/transaction_base.rb +52 -0
  61. data/lib/lunchmoney/transactions/transaction/transaction_modification_base.rb +30 -0
  62. data/lib/lunchmoney/transactions/transaction/update_transaction.rb +43 -0
  63. data/lib/lunchmoney/transactions/transaction_calls.rb +218 -0
  64. data/lib/lunchmoney/user/user.rb +36 -0
  65. data/lib/lunchmoney/user/user_calls.rb +19 -0
  66. data/lib/lunchmoney/validators.rb +43 -0
  67. data/lib/lunchmoney/version.rb +7 -0
  68. data/lib/lunchmoney.rb +54 -0
  69. data/lunchmoney.gemspec +34 -0
  70. data/sorbet/config +5 -0
  71. data/sorbet/rbi/annotations/.gitattributes +1 -0
  72. data/sorbet/rbi/annotations/activesupport.rbi +410 -0
  73. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  74. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  75. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  76. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  77. data/sorbet/rbi/dsl/.gitattributes +1 -0
  78. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  79. data/sorbet/rbi/gems/.gitattributes +1 -0
  80. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18004 -0
  81. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  82. data/sorbet/rbi/gems/appraisal@2.5.0.rbi +621 -0
  83. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  84. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  85. data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +77 -0
  86. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  87. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11590 -0
  88. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  89. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  90. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +234 -0
  91. data/sorbet/rbi/gems/drb@2.2.0.rbi +1346 -0
  92. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  93. data/sorbet/rbi/gems/faraday-net_http@3.1.0.rbi +146 -0
  94. data/sorbet/rbi/gems/faraday@2.9.0.rbi +2911 -0
  95. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  96. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2325 -0
  97. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  98. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  99. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  100. data/sorbet/rbi/gems/minitest@5.21.2.rbi +2197 -0
  101. data/sorbet/rbi/gems/mocha@2.1.0.rbi +3934 -0
  102. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  103. data/sorbet/rbi/gems/net-http@0.4.1.rbi +4068 -0
  104. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  105. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  106. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  107. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  108. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  109. data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +966 -0
  110. data/sorbet/rbi/gems/pry@0.14.2.rbi +10077 -0
  111. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +935 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5183 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  116. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  117. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  118. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  119. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7117 -0
  120. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2576 -0
  121. data/sorbet/rbi/gems/rubocop-rails@2.23.1.rbi +9175 -0
  122. data/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi +8 -0
  123. data/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi +1510 -0
  124. data/sorbet/rbi/gems/rubocop@1.60.1.rbi +57356 -0
  125. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  126. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  127. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  128. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  129. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3506 -0
  130. data/sorbet/rbi/gems/thor@1.3.0.rbi +4312 -0
  131. data/sorbet/rbi/gems/toys-core@0.15.4.rbi +9462 -0
  132. data/sorbet/rbi/gems/toys@0.15.4.rbi +243 -0
  133. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  134. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  135. data/sorbet/rbi/gems/uri@0.13.0.rbi +2327 -0
  136. data/sorbet/rbi/gems/vcr@6.2.0.rbi +3036 -0
  137. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1768 -0
  138. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  139. data/sorbet/rbi/gems/yard@0.9.34.rbi +18084 -0
  140. data/sorbet/shims/module.rbi +6 -0
  141. data/sorbet/tapioca/require.rb +10 -0
  142. metadata +228 -0
@@ -0,0 +1,508 @@
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
+ # \Module \Base64 provides methods for:
8
+ #
9
+ # - Encoding a binary string (containing non-ASCII characters)
10
+ # as a string of printable ASCII characters.
11
+ # - Decoding such an encoded string.
12
+ #
13
+ # \Base64 is commonly used in contexts where binary data
14
+ # is not allowed or supported:
15
+ #
16
+ # - Images in HTML or CSS files, or in URLs.
17
+ # - Email attachments.
18
+ #
19
+ # A \Base64-encoded string is about one-third larger that its source.
20
+ # See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64]
21
+ # for more information.
22
+ #
23
+ # This module provides three pairs of encode/decode methods.
24
+ # Your choices among these methods should depend on:
25
+ #
26
+ # - Which character set is to be used for encoding and decoding.
27
+ # - Whether "padding" is to be used.
28
+ # - Whether encoded strings are to contain newlines.
29
+ #
30
+ # Note: Examples on this page assume that the including program has executed:
31
+ #
32
+ # require 'base64'
33
+ #
34
+ # == Encoding Character Sets
35
+ #
36
+ # A \Base64-encoded string consists only of characters from a 64-character set:
37
+ #
38
+ # - <tt>('A'..'Z')</tt>.
39
+ # - <tt>('a'..'z')</tt>.
40
+ # - <tt>('0'..'9')</tt>.
41
+ # - <tt>=</tt>, the 'padding' character.
42
+ # - Either:
43
+ # - <tt>%w[+ /]</tt>:
44
+ # {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045];
45
+ # _not_ safe for URLs.
46
+ # - <tt>%w[- _]</tt>:
47
+ # {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648];
48
+ # safe for URLs.
49
+ #
50
+ # If you are working with \Base64-encoded strings that will come from
51
+ # or be put into URLs, you should choose this encoder-decoder pair
52
+ # of RFC-4648-compliant methods:
53
+ #
54
+ # - Base64.urlsafe_encode64 and Base64.urlsafe_decode64.
55
+ #
56
+ # Otherwise, you may choose any of the pairs in this module,
57
+ # including the pair above, or the RFC-2045-compliant pairs:
58
+ #
59
+ # - Base64.encode64 and Base64.decode64.
60
+ # - Base64.strict_encode64 and Base64.strict_decode64.
61
+ #
62
+ # == Padding
63
+ #
64
+ # \Base64-encoding changes a triplet of input bytes
65
+ # into a quartet of output characters.
66
+ #
67
+ # <b>Padding in Encode Methods</b>
68
+ #
69
+ # Padding -- extending an encoded string with zero, one, or two trailing
70
+ # <tt>=</tt> characters -- is performed by methods Base64.encode64,
71
+ # Base64.strict_encode64, and, by default, Base64.urlsafe_encode64:
72
+ #
73
+ # Base64.encode64('s') # => "cw==\n"
74
+ # Base64.strict_encode64('s') # => "cw=="
75
+ # Base64.urlsafe_encode64('s') # => "cw=="
76
+ # Base64.urlsafe_encode64('s', padding: false) # => "cw"
77
+ #
78
+ # When padding is performed, the encoded string is always of length <em>4n</em>,
79
+ # where +n+ is a non-negative integer:
80
+ #
81
+ # - Input bytes of length <em>3n</em> generate unpadded output characters
82
+ # of length <em>4n</em>:
83
+ #
84
+ # # n = 1: 3 bytes => 4 characters.
85
+ # Base64.strict_encode64('123') # => "MDEy"
86
+ # # n = 2: 6 bytes => 8 characters.
87
+ # Base64.strict_encode64('123456') # => "MDEyMzQ1"
88
+ #
89
+ # - Input bytes of length <em>3n+1</em> generate padded output characters
90
+ # of length <em>4(n+1)</em>, with two padding characters at the end:
91
+ #
92
+ # # n = 1: 4 bytes => 8 characters.
93
+ # Base64.strict_encode64('1234') # => "MDEyMw=="
94
+ # # n = 2: 7 bytes => 12 characters.
95
+ # Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng=="
96
+ #
97
+ # - Input bytes of length <em>3n+2</em> generate padded output characters
98
+ # of length <em>4(n+1)</em>, with one padding character at the end:
99
+ #
100
+ # # n = 1: 5 bytes => 8 characters.
101
+ # Base64.strict_encode64('12345') # => "MDEyMzQ="
102
+ # # n = 2: 8 bytes => 12 characters.
103
+ # Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc="
104
+ #
105
+ # When padding is suppressed, for a positive integer <em>n</em>:
106
+ #
107
+ # - Input bytes of length <em>3n</em> generate unpadded output characters
108
+ # of length <em>4n</em>:
109
+ #
110
+ # # n = 1: 3 bytes => 4 characters.
111
+ # Base64.urlsafe_encode64('123', padding: false) # => "MDEy"
112
+ # # n = 2: 6 bytes => 8 characters.
113
+ # Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1"
114
+ #
115
+ # - Input bytes of length <em>3n+1</em> generate unpadded output characters
116
+ # of length <em>4n+2</em>, with two padding characters at the end:
117
+ #
118
+ # # n = 1: 4 bytes => 6 characters.
119
+ # Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw"
120
+ # # n = 2: 7 bytes => 10 characters.
121
+ # Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng"
122
+ #
123
+ # - Input bytes of length <em>3n+2</em> generate unpadded output characters
124
+ # of length <em>4n+3</em>, with one padding character at the end:
125
+ #
126
+ # # n = 1: 5 bytes => 7 characters.
127
+ # Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ"
128
+ # # m = 2: 8 bytes => 11 characters.
129
+ # Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc"
130
+ #
131
+ # <b>Padding in Decode Methods</b>
132
+ #
133
+ # All of the \Base64 decode methods support (but do not require) padding.
134
+ #
135
+ # \Method Base64.decode64 does not check the size of the padding:
136
+ #
137
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
138
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
139
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
140
+ #
141
+ # \Method Base64.strict_decode64 strictly enforces padding size:
142
+ #
143
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
144
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
145
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
146
+ #
147
+ # \Method Base64.urlsafe_decode64 allows padding in +str+,
148
+ # which if present, must be correct:
149
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
150
+ #
151
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
152
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
153
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
154
+ #
155
+ # == Newlines
156
+ #
157
+ # An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64
158
+ # has an embedded newline character
159
+ # after each 60-character sequence, and, if non-empty, at the end:
160
+ #
161
+ # # No newline if empty.
162
+ # encoded = Base64.encode64("\x00" * 0)
163
+ # encoded.index("\n") # => nil
164
+ #
165
+ # # Newline at end of short output.
166
+ # encoded = Base64.encode64("\x00" * 1)
167
+ # encoded.size # => 4
168
+ # encoded.index("\n") # => 4
169
+ #
170
+ # # Newline at end of longer output.
171
+ # encoded = Base64.encode64("\x00" * 45)
172
+ # encoded.size # => 60
173
+ # encoded.index("\n") # => 60
174
+ #
175
+ # # Newlines embedded and at end of still longer output.
176
+ # encoded = Base64.encode64("\x00" * 46)
177
+ # encoded.size # => 65
178
+ # encoded.rindex("\n") # => 65
179
+ # encoded.split("\n").map {|s| s.size } # => [60, 4]
180
+ #
181
+ # The string to be encoded may itself contain newlines,
182
+ # which are encoded as \Base64:
183
+ #
184
+ # # Base64.encode64("\n\n\n") # => "CgoK\n"
185
+ # s = "This is line 1\nThis is line 2\n"
186
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
187
+ #
188
+ # source://base64//lib/base64.rb#184
189
+ module Base64
190
+ private
191
+
192
+ # Returns a string containing the decoding of an RFC-2045-compliant
193
+ # \Base64-encoded string +str+:
194
+ #
195
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
196
+ # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
197
+ #
198
+ # Non-\Base64 characters in +str+ are ignored;
199
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
200
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
201
+ #
202
+ # Base64.decode64("\x00\n-_") # => ""
203
+ #
204
+ # Padding in +str+ (even if incorrect) is ignored:
205
+ #
206
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
207
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
208
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
209
+ #
210
+ # source://base64//lib/base64.rb#241
211
+ def decode64(str); end
212
+
213
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
214
+ #
215
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
216
+ # <tt>+</tt> or <tt>/</tt>;
217
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
218
+ #
219
+ # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
220
+ # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
221
+ #
222
+ # The returned string may include padding;
223
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
224
+ #
225
+ # Base64.encode64('*') # => "Kg==\n"
226
+ #
227
+ # The returned string ends with a newline character, and if sufficiently long
228
+ # will have one or more embedded newline characters;
229
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
230
+ #
231
+ # Base64.encode64('*') # => "Kg==\n"
232
+ # Base64.encode64('*' * 46)
233
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
234
+ #
235
+ # The string to be encoded may itself contain newlines,
236
+ # which will be encoded as ordinary \Base64:
237
+ #
238
+ # Base64.encode64("\n\n\n") # => "CgoK\n"
239
+ # s = "This is line 1\nThis is line 2\n"
240
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
241
+ #
242
+ # source://base64//lib/base64.rb#219
243
+ def encode64(bin); end
244
+
245
+ # Returns a string containing the decoding of an RFC-2045-compliant
246
+ # \Base64-encoded string +str+:
247
+ #
248
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
249
+ # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
250
+ #
251
+ # Non-\Base64 characters in +str+ not allowed;
252
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
253
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
254
+ #
255
+ # Base64.strict_decode64("\n") # Raises ArgumentError
256
+ # Base64.strict_decode64('-') # Raises ArgumentError
257
+ # Base64.strict_decode64('_') # Raises ArgumentError
258
+ #
259
+ # Padding in +str+, if present, must be correct:
260
+ #
261
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
262
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
263
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
264
+ #
265
+ # source://base64//lib/base64.rb#297
266
+ def strict_decode64(str); end
267
+
268
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
269
+ #
270
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
271
+ # <tt>+</tt> or <tt>/</tt>;
272
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
273
+ #
274
+ # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
275
+ # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
276
+ #
277
+ # The returned string may include padding;
278
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
279
+ #
280
+ # Base64.strict_encode64('*') # => "Kg==\n"
281
+ #
282
+ # The returned string will have no newline characters, regardless of its length;
283
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
284
+ #
285
+ # Base64.strict_encode64('*') # => "Kg=="
286
+ # Base64.strict_encode64('*' * 46)
287
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
288
+ #
289
+ # The string to be encoded may itself contain newlines,
290
+ # which will be encoded as ordinary \Base64:
291
+ #
292
+ # Base64.strict_encode64("\n\n\n") # => "CgoK"
293
+ # s = "This is line 1\nThis is line 2\n"
294
+ # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
295
+ #
296
+ # source://base64//lib/base64.rb#273
297
+ def strict_encode64(bin); end
298
+
299
+ # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
300
+ #
301
+ # +str+ may not contain non-Base64 characters;
302
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
303
+ #
304
+ # Base64.urlsafe_decode64('+') # Raises ArgumentError.
305
+ # Base64.urlsafe_decode64('/') # Raises ArgumentError.
306
+ # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
307
+ #
308
+ # Padding in +str+, if present, must be correct:
309
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
310
+ #
311
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
312
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
313
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
314
+ #
315
+ # source://base64//lib/base64.rb#351
316
+ def urlsafe_decode64(str); end
317
+
318
+ # Returns the RFC-4648-compliant \Base64-encoding of +bin+.
319
+ #
320
+ # Per RFC 4648, the returned string will not contain the URL-unsafe characters
321
+ # <tt>+</tt> or <tt>/</tt>,
322
+ # but instead may contain the URL-safe characters
323
+ # <tt>-</tt> and <tt>_</tt>;
324
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
325
+ #
326
+ # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
327
+ # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
328
+ #
329
+ # By default, the returned string may have padding;
330
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
331
+ #
332
+ # Base64.urlsafe_encode64('*') # => "Kg=="
333
+ #
334
+ # Optionally, you can suppress padding:
335
+ #
336
+ # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
337
+ #
338
+ # The returned string will have no newline characters, regardless of its length;
339
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
340
+ #
341
+ # Base64.urlsafe_encode64('*') # => "Kg=="
342
+ # Base64.urlsafe_encode64('*' * 46)
343
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
344
+ #
345
+ # source://base64//lib/base64.rb#328
346
+ def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
347
+
348
+ class << self
349
+ # Returns a string containing the decoding of an RFC-2045-compliant
350
+ # \Base64-encoded string +str+:
351
+ #
352
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
353
+ # Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
354
+ #
355
+ # Non-\Base64 characters in +str+ are ignored;
356
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
357
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
358
+ #
359
+ # Base64.decode64("\x00\n-_") # => ""
360
+ #
361
+ # Padding in +str+ (even if incorrect) is ignored:
362
+ #
363
+ # Base64.decode64("MDEyMzQ1Njc") # => "01234567"
364
+ # Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
365
+ # Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
366
+ #
367
+ # source://base64//lib/base64.rb#241
368
+ def decode64(str); end
369
+
370
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
371
+ #
372
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
373
+ # <tt>+</tt> or <tt>/</tt>;
374
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
375
+ #
376
+ # Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
377
+ # Base64.encode64("\xFF\xFF\xFF") # => "////\n"
378
+ #
379
+ # The returned string may include padding;
380
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
381
+ #
382
+ # Base64.encode64('*') # => "Kg==\n"
383
+ #
384
+ # The returned string ends with a newline character, and if sufficiently long
385
+ # will have one or more embedded newline characters;
386
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
387
+ #
388
+ # Base64.encode64('*') # => "Kg==\n"
389
+ # Base64.encode64('*' * 46)
390
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
391
+ #
392
+ # The string to be encoded may itself contain newlines,
393
+ # which will be encoded as ordinary \Base64:
394
+ #
395
+ # Base64.encode64("\n\n\n") # => "CgoK\n"
396
+ # s = "This is line 1\nThis is line 2\n"
397
+ # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
398
+ #
399
+ # source://base64//lib/base64.rb#219
400
+ def encode64(bin); end
401
+
402
+ # Returns a string containing the decoding of an RFC-2045-compliant
403
+ # \Base64-encoded string +str+:
404
+ #
405
+ # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
406
+ # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
407
+ #
408
+ # Non-\Base64 characters in +str+ not allowed;
409
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
410
+ # these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
411
+ #
412
+ # Base64.strict_decode64("\n") # Raises ArgumentError
413
+ # Base64.strict_decode64('-') # Raises ArgumentError
414
+ # Base64.strict_decode64('_') # Raises ArgumentError
415
+ #
416
+ # Padding in +str+, if present, must be correct:
417
+ #
418
+ # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
419
+ # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
420
+ # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
421
+ #
422
+ # source://base64//lib/base64.rb#297
423
+ def strict_decode64(str); end
424
+
425
+ # Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
426
+ #
427
+ # Per RFC 2045, the returned string may contain the URL-unsafe characters
428
+ # <tt>+</tt> or <tt>/</tt>;
429
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
430
+ #
431
+ # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
432
+ # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
433
+ #
434
+ # The returned string may include padding;
435
+ # see {Padding}[Base64.html#module-Base64-label-Padding] above.
436
+ #
437
+ # Base64.strict_encode64('*') # => "Kg==\n"
438
+ #
439
+ # The returned string will have no newline characters, regardless of its length;
440
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
441
+ #
442
+ # Base64.strict_encode64('*') # => "Kg=="
443
+ # Base64.strict_encode64('*' * 46)
444
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
445
+ #
446
+ # The string to be encoded may itself contain newlines,
447
+ # which will be encoded as ordinary \Base64:
448
+ #
449
+ # Base64.strict_encode64("\n\n\n") # => "CgoK"
450
+ # s = "This is line 1\nThis is line 2\n"
451
+ # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
452
+ #
453
+ # source://base64//lib/base64.rb#273
454
+ def strict_encode64(bin); end
455
+
456
+ # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
457
+ #
458
+ # +str+ may not contain non-Base64 characters;
459
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
460
+ #
461
+ # Base64.urlsafe_decode64('+') # Raises ArgumentError.
462
+ # Base64.urlsafe_decode64('/') # Raises ArgumentError.
463
+ # Base64.urlsafe_decode64("\n") # Raises ArgumentError.
464
+ #
465
+ # Padding in +str+, if present, must be correct:
466
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
467
+ #
468
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
469
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
470
+ # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
471
+ #
472
+ # source://base64//lib/base64.rb#351
473
+ def urlsafe_decode64(str); end
474
+
475
+ # Returns the RFC-4648-compliant \Base64-encoding of +bin+.
476
+ #
477
+ # Per RFC 4648, the returned string will not contain the URL-unsafe characters
478
+ # <tt>+</tt> or <tt>/</tt>,
479
+ # but instead may contain the URL-safe characters
480
+ # <tt>-</tt> and <tt>_</tt>;
481
+ # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
482
+ #
483
+ # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
484
+ # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
485
+ #
486
+ # By default, the returned string may have padding;
487
+ # see {Padding}[Base64.html#module-Base64-label-Padding], above:
488
+ #
489
+ # Base64.urlsafe_encode64('*') # => "Kg=="
490
+ #
491
+ # Optionally, you can suppress padding:
492
+ #
493
+ # Base64.urlsafe_encode64('*', padding: false) # => "Kg"
494
+ #
495
+ # The returned string will have no newline characters, regardless of its length;
496
+ # see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
497
+ #
498
+ # Base64.urlsafe_encode64('*') # => "Kg=="
499
+ # Base64.urlsafe_encode64('*' * 46)
500
+ # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
501
+ #
502
+ # source://base64//lib/base64.rb#328
503
+ def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
504
+ end
505
+ end
506
+
507
+ # source://base64//lib/base64.rb#186
508
+ Base64::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,77 @@
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
+ # source://bigdecimal//lib/bigdecimal/util.rb#78
8
+ class BigDecimal < ::Numeric
9
+ # call-seq:
10
+ # a.to_d -> bigdecimal
11
+ #
12
+ # Returns self.
13
+ #
14
+ # require 'bigdecimal/util'
15
+ #
16
+ # d = BigDecimal("3.14")
17
+ # d.to_d # => 0.314e1
18
+ #
19
+ # source://bigdecimal//lib/bigdecimal/util.rb#110
20
+ def to_d; end
21
+
22
+ # call-seq:
23
+ # a.to_digits -> string
24
+ #
25
+ # Converts a BigDecimal to a String of the form "nnnnnn.mmm".
26
+ # This method is deprecated; use BigDecimal#to_s("F") instead.
27
+ #
28
+ # require 'bigdecimal/util'
29
+ #
30
+ # d = BigDecimal("3.14")
31
+ # d.to_digits # => "3.14"
32
+ #
33
+ # source://bigdecimal//lib/bigdecimal/util.rb#90
34
+ def to_digits; end
35
+ end
36
+
37
+ BigDecimal::VERSION = T.let(T.unsafe(nil), String)
38
+
39
+ # source://bigdecimal//lib/bigdecimal/util.rb#138
40
+ class Complex < ::Numeric
41
+ # call-seq:
42
+ # cmp.to_d -> bigdecimal
43
+ # cmp.to_d(precision) -> bigdecimal
44
+ #
45
+ # Returns the value as a BigDecimal.
46
+ #
47
+ # The +precision+ parameter is required for a rational complex number.
48
+ # This parameter is used to determine the number of significant digits
49
+ # for the result.
50
+ #
51
+ # require 'bigdecimal'
52
+ # require 'bigdecimal/util'
53
+ #
54
+ # Complex(0.1234567, 0).to_d(4) # => 0.1235e0
55
+ # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
56
+ #
57
+ # See also Kernel.BigDecimal.
58
+ #
59
+ # source://bigdecimal//lib/bigdecimal/util.rb#157
60
+ def to_d(*args); end
61
+ end
62
+
63
+ # source://bigdecimal//lib/bigdecimal/util.rb#171
64
+ class NilClass
65
+ # call-seq:
66
+ # nil.to_d -> bigdecimal
67
+ #
68
+ # Returns nil represented as a BigDecimal.
69
+ #
70
+ # require 'bigdecimal'
71
+ # require 'bigdecimal/util'
72
+ #
73
+ # nil.to_d # => 0.0
74
+ #
75
+ # source://bigdecimal//lib/bigdecimal/util.rb#182
76
+ def to_d; end
77
+ end