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,1346 @@
1
+ # typed: false
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `drb` gem.
5
+ # Please instead update this file by running `bin/tapioca gem drb`.
6
+
7
+ # for ruby-1.8.0
8
+ #
9
+ # source://drb//lib/drb/eq.rb#2
10
+ module DRb
11
+ private
12
+
13
+ # Get the configuration of the current server.
14
+ #
15
+ # If there is no current server, this returns the default configuration.
16
+ # See #current_server and DRbServer::make_config.
17
+ #
18
+ # source://drb//lib/drb/drb.rb#1832
19
+ def config; end
20
+
21
+ # Get the 'current' server.
22
+ #
23
+ # In the context of execution taking place within the main
24
+ # thread of a dRuby server (typically, as a result of a remote
25
+ # call on the server or one of its objects), the current
26
+ # server is that server. Otherwise, the current server is
27
+ # the primary server.
28
+ #
29
+ # If the above rule fails to find a server, a DRbServerNotFound
30
+ # error is raised.
31
+ #
32
+ # @raise [DRbServerNotFound]
33
+ #
34
+ # source://drb//lib/drb/drb.rb#1789
35
+ def current_server; end
36
+
37
+ # Retrieves the server with the given +uri+.
38
+ #
39
+ # See also regist_server and remove_server.
40
+ #
41
+ # source://drb//lib/drb/drb.rb#1934
42
+ def fetch_server(uri); end
43
+
44
+ # Get the front object of the current server.
45
+ #
46
+ # This raises a DRbServerNotFound error if there is no current server.
47
+ # See #current_server.
48
+ #
49
+ # source://drb//lib/drb/drb.rb#1843
50
+ def front; end
51
+
52
+ # Is +uri+ the URI for the current local server?
53
+ #
54
+ # @return [Boolean]
55
+ #
56
+ # source://drb//lib/drb/drb.rb#1822
57
+ def here?(uri); end
58
+
59
+ # Set the default ACL to +acl+.
60
+ #
61
+ # See DRb::DRbServer.default_acl.
62
+ #
63
+ # source://drb//lib/drb/drb.rb#1888
64
+ def install_acl(acl); end
65
+
66
+ # Set the default id conversion object.
67
+ #
68
+ # This is expected to be an instance such as DRb::DRbIdConv that responds to
69
+ # #to_id and #to_obj that can convert objects to and from DRb references.
70
+ #
71
+ # See DRbServer#default_id_conv.
72
+ #
73
+ # source://drb//lib/drb/drb.rb#1880
74
+ def install_id_conv(idconv); end
75
+
76
+ # source://drb//lib/drb/drb.rb#1894
77
+ def mutex; end
78
+
79
+ # The primary local dRuby server.
80
+ #
81
+ # This is the server created by the #start_service call.
82
+ #
83
+ # source://drb//lib/drb/drb.rb#1776
84
+ def primary_server; end
85
+
86
+ # The primary local dRuby server.
87
+ #
88
+ # This is the server created by the #start_service call.
89
+ #
90
+ # source://drb//lib/drb/drb.rb#1776
91
+ def primary_server=(_arg0); end
92
+
93
+ # Registers +server+ with DRb.
94
+ #
95
+ # This is called when a new DRb::DRbServer is created.
96
+ #
97
+ # If there is no primary server then +server+ becomes the primary server.
98
+ #
99
+ # Example:
100
+ #
101
+ # require 'drb'
102
+ #
103
+ # s = DRb::DRbServer.new # automatically calls regist_server
104
+ # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
105
+ #
106
+ # source://drb//lib/drb/drb.rb#1912
107
+ def regist_server(server); end
108
+
109
+ # Removes +server+ from the list of registered servers.
110
+ #
111
+ # source://drb//lib/drb/drb.rb#1921
112
+ def remove_server(server); end
113
+
114
+ # Start a dRuby server locally.
115
+ #
116
+ # The new dRuby server will become the primary server, even
117
+ # if another server is currently the primary server.
118
+ #
119
+ # +uri+ is the URI for the server to bind to. If nil,
120
+ # the server will bind to random port on the default local host
121
+ # name and use the default dRuby protocol.
122
+ #
123
+ # +front+ is the server's front object. This may be nil.
124
+ #
125
+ # +config+ is the configuration for the new server. This may
126
+ # be nil.
127
+ #
128
+ # See DRbServer::new.
129
+ #
130
+ # source://drb//lib/drb/drb.rb#1768
131
+ def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
132
+
133
+ # Stop the local dRuby server.
134
+ #
135
+ # This operates on the primary server. If there is no primary
136
+ # server currently running, it is a noop.
137
+ #
138
+ # source://drb//lib/drb/drb.rb#1801
139
+ def stop_service; end
140
+
141
+ # Get the thread of the primary server.
142
+ #
143
+ # This returns nil if there is no primary server. See #primary_server.
144
+ #
145
+ # source://drb//lib/drb/drb.rb#1869
146
+ def thread; end
147
+
148
+ # Get a reference id for an object using the current server.
149
+ #
150
+ # This raises a DRbServerNotFound error if there is no current server.
151
+ # See #current_server.
152
+ #
153
+ # source://drb//lib/drb/drb.rb#1860
154
+ def to_id(obj); end
155
+
156
+ # Convert a reference into an object using the current server.
157
+ #
158
+ # This raises a DRbServerNotFound error if there is no current server.
159
+ # See #current_server.
160
+ #
161
+ # source://drb//lib/drb/drb.rb#1852
162
+ def to_obj(ref); end
163
+
164
+ # Get the URI defining the local dRuby space.
165
+ #
166
+ # This is the URI of the current server. See #current_server.
167
+ #
168
+ # source://drb//lib/drb/drb.rb#1810
169
+ def uri; end
170
+
171
+ class << self
172
+ # Get the configuration of the current server.
173
+ #
174
+ # If there is no current server, this returns the default configuration.
175
+ # See #current_server and DRbServer::make_config.
176
+ #
177
+ # source://drb//lib/drb/drb.rb#1832
178
+ def config; end
179
+
180
+ # Get the 'current' server.
181
+ #
182
+ # In the context of execution taking place within the main
183
+ # thread of a dRuby server (typically, as a result of a remote
184
+ # call on the server or one of its objects), the current
185
+ # server is that server. Otherwise, the current server is
186
+ # the primary server.
187
+ #
188
+ # If the above rule fails to find a server, a DRbServerNotFound
189
+ # error is raised.
190
+ #
191
+ # @raise [DRbServerNotFound]
192
+ #
193
+ # source://drb//lib/drb/drb.rb#1789
194
+ def current_server; end
195
+
196
+ # Retrieves the server with the given +uri+.
197
+ #
198
+ # See also regist_server and remove_server.
199
+ #
200
+ # source://drb//lib/drb/drb.rb#1934
201
+ def fetch_server(uri); end
202
+
203
+ # Get the front object of the current server.
204
+ #
205
+ # This raises a DRbServerNotFound error if there is no current server.
206
+ # See #current_server.
207
+ #
208
+ # source://drb//lib/drb/drb.rb#1843
209
+ def front; end
210
+
211
+ # Is +uri+ the URI for the current local server?
212
+ #
213
+ # @return [Boolean]
214
+ #
215
+ # source://drb//lib/drb/drb.rb#1822
216
+ def here?(uri); end
217
+
218
+ # Set the default ACL to +acl+.
219
+ #
220
+ # See DRb::DRbServer.default_acl.
221
+ #
222
+ # source://drb//lib/drb/drb.rb#1888
223
+ def install_acl(acl); end
224
+
225
+ # Set the default id conversion object.
226
+ #
227
+ # This is expected to be an instance such as DRb::DRbIdConv that responds to
228
+ # #to_id and #to_obj that can convert objects to and from DRb references.
229
+ #
230
+ # See DRbServer#default_id_conv.
231
+ #
232
+ # source://drb//lib/drb/drb.rb#1880
233
+ def install_id_conv(idconv); end
234
+
235
+ # source://drb//lib/drb/drb.rb#1894
236
+ def mutex; end
237
+
238
+ # The primary local dRuby server.
239
+ #
240
+ # This is the server created by the #start_service call.
241
+ #
242
+ # source://drb//lib/drb/drb.rb#1776
243
+ def primary_server; end
244
+
245
+ # The primary local dRuby server.
246
+ #
247
+ # This is the server created by the #start_service call.
248
+ #
249
+ # source://drb//lib/drb/drb.rb#1776
250
+ def primary_server=(_arg0); end
251
+
252
+ # Registers +server+ with DRb.
253
+ #
254
+ # This is called when a new DRb::DRbServer is created.
255
+ #
256
+ # If there is no primary server then +server+ becomes the primary server.
257
+ #
258
+ # Example:
259
+ #
260
+ # require 'drb'
261
+ #
262
+ # s = DRb::DRbServer.new # automatically calls regist_server
263
+ # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
264
+ #
265
+ # source://drb//lib/drb/drb.rb#1912
266
+ def regist_server(server); end
267
+
268
+ # Removes +server+ from the list of registered servers.
269
+ #
270
+ # source://drb//lib/drb/drb.rb#1921
271
+ def remove_server(server); end
272
+
273
+ # Start a dRuby server locally.
274
+ #
275
+ # The new dRuby server will become the primary server, even
276
+ # if another server is currently the primary server.
277
+ #
278
+ # +uri+ is the URI for the server to bind to. If nil,
279
+ # the server will bind to random port on the default local host
280
+ # name and use the default dRuby protocol.
281
+ #
282
+ # +front+ is the server's front object. This may be nil.
283
+ #
284
+ # +config+ is the configuration for the new server. This may
285
+ # be nil.
286
+ #
287
+ # See DRbServer::new.
288
+ #
289
+ # source://drb//lib/drb/drb.rb#1768
290
+ def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
291
+
292
+ # Stop the local dRuby server.
293
+ #
294
+ # This operates on the primary server. If there is no primary
295
+ # server currently running, it is a noop.
296
+ #
297
+ # source://drb//lib/drb/drb.rb#1801
298
+ def stop_service; end
299
+
300
+ # Get the thread of the primary server.
301
+ #
302
+ # This returns nil if there is no primary server. See #primary_server.
303
+ #
304
+ # source://drb//lib/drb/drb.rb#1869
305
+ def thread; end
306
+
307
+ # Get a reference id for an object using the current server.
308
+ #
309
+ # This raises a DRbServerNotFound error if there is no current server.
310
+ # See #current_server.
311
+ #
312
+ # source://drb//lib/drb/drb.rb#1860
313
+ def to_id(obj); end
314
+
315
+ # Convert a reference into an object using the current server.
316
+ #
317
+ # This raises a DRbServerNotFound error if there is no current server.
318
+ # See #current_server.
319
+ #
320
+ # source://drb//lib/drb/drb.rb#1852
321
+ def to_obj(ref); end
322
+
323
+ # Get the URI defining the local dRuby space.
324
+ #
325
+ # This is the URI of the current server. See #current_server.
326
+ #
327
+ # source://drb//lib/drb/drb.rb#1810
328
+ def uri; end
329
+ end
330
+ end
331
+
332
+ # An Array wrapper that can be sent to another server via DRb.
333
+ #
334
+ # All entries in the array will be dumped or be references that point to
335
+ # the local server.
336
+ #
337
+ # source://drb//lib/drb/drb.rb#518
338
+ class DRb::DRbArray
339
+ # Creates a new DRbArray that either dumps or wraps all the items in the
340
+ # Array +ary+ so they can be loaded by a remote DRb server.
341
+ #
342
+ # @return [DRbArray] a new instance of DRbArray
343
+ #
344
+ # source://drb//lib/drb/drb.rb#523
345
+ def initialize(ary); end
346
+
347
+ # source://drb//lib/drb/drb.rb#542
348
+ def _dump(lv); end
349
+
350
+ class << self
351
+ # source://drb//lib/drb/drb.rb#538
352
+ def _load(s); end
353
+ end
354
+ end
355
+
356
+ # Class handling the connection between a DRbObject and the
357
+ # server the real object lives on.
358
+ #
359
+ # This class maintains a pool of connections, to reduce the
360
+ # overhead of starting and closing down connections for each
361
+ # method call.
362
+ #
363
+ # This class is used internally by DRbObject. The user does
364
+ # not normally need to deal with it directly.
365
+ #
366
+ # source://drb//lib/drb/drb.rb#1256
367
+ class DRb::DRbConn
368
+ # @return [DRbConn] a new instance of DRbConn
369
+ #
370
+ # source://drb//lib/drb/drb.rb#1317
371
+ def initialize(remote_uri); end
372
+
373
+ # @return [Boolean]
374
+ #
375
+ # source://drb//lib/drb/drb.rb#1333
376
+ def alive?; end
377
+
378
+ # source://drb//lib/drb/drb.rb#1328
379
+ def close; end
380
+
381
+ # source://drb//lib/drb/drb.rb#1323
382
+ def send_message(ref, msg_id, arg, block); end
383
+
384
+ # source://drb//lib/drb/drb.rb#1321
385
+ def uri; end
386
+
387
+ class << self
388
+ # source://drb//lib/drb/drb.rb#1259
389
+ def make_pool; end
390
+
391
+ # source://drb//lib/drb/drb.rb#1297
392
+ def open(remote_uri); end
393
+
394
+ # source://drb//lib/drb/drb.rb#1292
395
+ def stop_pool; end
396
+ end
397
+ end
398
+
399
+ # Class responsible for converting between an object and its id.
400
+ #
401
+ # This, the default implementation, uses an object's local ObjectSpace
402
+ # __id__ as its id. This means that an object's identification over
403
+ # drb remains valid only while that object instance remains alive
404
+ # within the server runtime.
405
+ #
406
+ # For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb
407
+ # and DRbNameIdConv in sample/name.rb in the full drb distribution.
408
+ #
409
+ # source://drb//lib/drb/drb.rb#360
410
+ class DRb::DRbIdConv
411
+ # Convert an object into a reference id.
412
+ #
413
+ # This implementation returns the object's __id__ in the local
414
+ # object space.
415
+ #
416
+ # source://drb//lib/drb/drb.rb#374
417
+ def to_id(obj); end
418
+
419
+ # Convert an object reference id to an object.
420
+ #
421
+ # This implementation looks up the reference id in the local object
422
+ # space and returns the object it refers to.
423
+ #
424
+ # source://drb//lib/drb/drb.rb#366
425
+ def to_obj(ref); end
426
+ end
427
+
428
+ # Handler for sending and receiving drb messages.
429
+ #
430
+ # This takes care of the low-level marshalling and unmarshalling
431
+ # of drb requests and responses sent over the wire between server
432
+ # and client. This relieves the implementor of a new drb
433
+ # protocol layer with having to deal with these details.
434
+ #
435
+ # The user does not have to directly deal with this object in
436
+ # normal use.
437
+ #
438
+ # source://drb//lib/drb/drb.rb#556
439
+ class DRb::DRbMessage
440
+ # @return [DRbMessage] a new instance of DRbMessage
441
+ #
442
+ # source://drb//lib/drb/drb.rb#557
443
+ def initialize(config); end
444
+
445
+ # source://drb//lib/drb/drb.rb#562
446
+ def dump(obj, error = T.unsafe(nil)); end
447
+
448
+ # @raise [DRbConnError]
449
+ #
450
+ # source://drb//lib/drb/drb.rb#579
451
+ def load(soc); end
452
+
453
+ # source://drb//lib/drb/drb.rb#639
454
+ def recv_reply(stream); end
455
+
456
+ # @raise [DRbConnError]
457
+ #
458
+ # source://drb//lib/drb/drb.rb#619
459
+ def recv_request(stream); end
460
+
461
+ # source://drb//lib/drb/drb.rb#633
462
+ def send_reply(stream, succ, result); end
463
+
464
+ # source://drb//lib/drb/drb.rb#605
465
+ def send_request(stream, ref, msg_id, arg, b); end
466
+
467
+ private
468
+
469
+ # source://drb//lib/drb/drb.rb#646
470
+ def make_proxy(obj, error = T.unsafe(nil)); end
471
+ end
472
+
473
+ # source://drb//lib/drb/eq.rb#3
474
+ class DRb::DRbObject
475
+ # Create a new remote object stub.
476
+ #
477
+ # +obj+ is the (local) object we want to create a stub for. Normally
478
+ # this is +nil+. +uri+ is the URI of the remote object that this
479
+ # will be a stub for.
480
+ #
481
+ # @return [DRbObject] a new instance of DRbObject
482
+ #
483
+ # source://drb//lib/drb/drb.rb#1089
484
+ def initialize(obj, uri = T.unsafe(nil)); end
485
+
486
+ # source://drb//lib/drb/eq.rb#4
487
+ def ==(other); end
488
+
489
+ # Get the reference of the object, if local.
490
+ #
491
+ # source://drb//lib/drb/drb.rb#1115
492
+ def __drbref; end
493
+
494
+ # Get the URI of the remote object.
495
+ #
496
+ # source://drb//lib/drb/drb.rb#1110
497
+ def __drburi; end
498
+
499
+ # Marshall this object.
500
+ #
501
+ # The URI and ref of the object are marshalled.
502
+ #
503
+ # source://drb//lib/drb/drb.rb#1080
504
+ def _dump(lv); end
505
+
506
+ # source://drb//lib/drb/eq.rb#4
507
+ def eql?(other); end
508
+
509
+ # source://drb//lib/drb/eq.rb#9
510
+ def hash; end
511
+
512
+ # source://drb//lib/drb/drb.rb#1135
513
+ def method_missing(msg_id, *a, **_arg2, &b); end
514
+
515
+ # source://drb//lib/drb/drb.rb#1187
516
+ def pretty_print(q); end
517
+
518
+ # source://drb//lib/drb/drb.rb#1191
519
+ def pretty_print_cycle(q); end
520
+
521
+ # Routes respond_to? to the referenced remote object.
522
+ #
523
+ # @return [Boolean]
524
+ #
525
+ # source://drb//lib/drb/drb.rb#1123
526
+ def respond_to?(msg_id, priv = T.unsafe(nil)); end
527
+
528
+ class << self
529
+ # Unmarshall a marshalled DRbObject.
530
+ #
531
+ # If the referenced object is located within the local server, then
532
+ # the object itself is returned. Otherwise, a new DRbObject is
533
+ # created to act as a stub for the remote referenced object.
534
+ #
535
+ # source://drb//lib/drb/drb.rb#1051
536
+ def _load(s); end
537
+
538
+ # Creates a DRb::DRbObject given the reference information to the remote
539
+ # host +uri+ and object +ref+.
540
+ #
541
+ # source://drb//lib/drb/drb.rb#1065
542
+ def new_with(uri, ref); end
543
+
544
+ # Create a new DRbObject from a URI alone.
545
+ #
546
+ # source://drb//lib/drb/drb.rb#1073
547
+ def new_with_uri(uri); end
548
+
549
+ # Returns a modified backtrace from +result+ with the +uri+ where each call
550
+ # in the backtrace came from.
551
+ #
552
+ # source://drb//lib/drb/drb.rb#1173
553
+ def prepare_backtrace(uri, result); end
554
+
555
+ # Given the +uri+ of another host executes the block provided.
556
+ #
557
+ # source://drb//lib/drb/drb.rb#1160
558
+ def with_friend(uri); end
559
+ end
560
+ end
561
+
562
+ # Module managing the underlying network protocol(s) used by drb.
563
+ #
564
+ # By default, drb uses the DRbTCPSocket protocol. Other protocols
565
+ # can be defined. A protocol must define the following class methods:
566
+ #
567
+ # [open(uri, config)] Open a client connection to the server at +uri+,
568
+ # using configuration +config+. Return a protocol
569
+ # instance for this connection.
570
+ # [open_server(uri, config)] Open a server listening at +uri+,
571
+ # using configuration +config+. Return a
572
+ # protocol instance for this listener.
573
+ # [uri_option(uri, config)] Take a URI, possibly containing an option
574
+ # component (e.g. a trailing '?param=val'),
575
+ # and return a [uri, option] tuple.
576
+ #
577
+ # All of these methods should raise a DRbBadScheme error if the URI
578
+ # does not identify the protocol they support (e.g. "druby:" for
579
+ # the standard Ruby protocol). This is how the DRbProtocol module,
580
+ # given a URI, determines which protocol implementation serves that
581
+ # protocol.
582
+ #
583
+ # The protocol instance returned by #open_server must have the
584
+ # following methods:
585
+ #
586
+ # [accept] Accept a new connection to the server. Returns a protocol
587
+ # instance capable of communicating with the client.
588
+ # [close] Close the server connection.
589
+ # [uri] Get the URI for this server.
590
+ #
591
+ # The protocol instance returned by #open must have the following methods:
592
+ #
593
+ # [send_request (ref, msg_id, arg, b)]
594
+ # Send a request to +ref+ with the given message id and arguments.
595
+ # This is most easily implemented by calling DRbMessage.send_request,
596
+ # providing a stream that sits on top of the current protocol.
597
+ # [recv_reply]
598
+ # Receive a reply from the server and return it as a [success-boolean,
599
+ # reply-value] pair. This is most easily implemented by calling
600
+ # DRb.recv_reply, providing a stream that sits on top of the
601
+ # current protocol.
602
+ # [alive?]
603
+ # Is this connection still alive?
604
+ # [close]
605
+ # Close this connection.
606
+ #
607
+ # The protocol instance returned by #open_server().accept() must have
608
+ # the following methods:
609
+ #
610
+ # [recv_request]
611
+ # Receive a request from the client and return a [object, message,
612
+ # args, block] tuple. This is most easily implemented by calling
613
+ # DRbMessage.recv_request, providing a stream that sits on top of
614
+ # the current protocol.
615
+ # [send_reply(succ, result)]
616
+ # Send a reply to the client. This is most easily implemented
617
+ # by calling DRbMessage.send_reply, providing a stream that sits
618
+ # on top of the current protocol.
619
+ # [close]
620
+ # Close this connection.
621
+ #
622
+ # A new protocol is registered with the DRbProtocol module using
623
+ # the add_protocol method.
624
+ #
625
+ # For examples of other protocols, see DRbUNIXSocket in drb/unix.rb,
626
+ # and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full
627
+ # drb distribution.
628
+ #
629
+ # source://drb//lib/drb/drb.rb#721
630
+ module DRb::DRbProtocol
631
+ private
632
+
633
+ # Add a new protocol to the DRbProtocol module.
634
+ #
635
+ # source://drb//lib/drb/drb.rb#724
636
+ def add_protocol(prot); end
637
+
638
+ # source://drb//lib/drb/drb.rb#802
639
+ def auto_load(uri); end
640
+
641
+ # Open a client connection to +uri+ with the configuration +config+.
642
+ #
643
+ # The DRbProtocol module asks each registered protocol in turn to
644
+ # try to open the URI. Each protocol signals that it does not handle that
645
+ # URI by raising a DRbBadScheme error. If no protocol recognises the
646
+ # URI, then a DRbBadURI error is raised. If a protocol accepts the
647
+ # URI, but an error occurs in opening it, a DRbConnError is raised.
648
+ #
649
+ # @raise [DRbBadURI]
650
+ #
651
+ # source://drb//lib/drb/drb.rb#736
652
+ def open(uri, config, first = T.unsafe(nil)); end
653
+
654
+ # Open a server listening for connections at +uri+ with
655
+ # configuration +config+.
656
+ #
657
+ # The DRbProtocol module asks each registered protocol in turn to
658
+ # try to open a server at the URI. Each protocol signals that it does
659
+ # not handle that URI by raising a DRbBadScheme error. If no protocol
660
+ # recognises the URI, then a DRbBadURI error is raised. If a protocol
661
+ # accepts the URI, but an error occurs in opening it, the underlying
662
+ # error is passed on to the caller.
663
+ #
664
+ # @raise [DRbBadURI]
665
+ #
666
+ # source://drb//lib/drb/drb.rb#764
667
+ def open_server(uri, config, first = T.unsafe(nil)); end
668
+
669
+ # Parse +uri+ into a [uri, option] pair.
670
+ #
671
+ # The DRbProtocol module asks each registered protocol in turn to
672
+ # try to parse the URI. Each protocol signals that it does not handle that
673
+ # URI by raising a DRbBadScheme error. If no protocol recognises the
674
+ # URI, then a DRbBadURI error is raised.
675
+ #
676
+ # @raise [DRbBadURI]
677
+ #
678
+ # source://drb//lib/drb/drb.rb#785
679
+ def uri_option(uri, config, first = T.unsafe(nil)); end
680
+
681
+ class << self
682
+ # Add a new protocol to the DRbProtocol module.
683
+ #
684
+ # source://drb//lib/drb/drb.rb#724
685
+ def add_protocol(prot); end
686
+
687
+ # source://drb//lib/drb/drb.rb#802
688
+ def auto_load(uri); end
689
+
690
+ # Open a client connection to +uri+ with the configuration +config+.
691
+ #
692
+ # The DRbProtocol module asks each registered protocol in turn to
693
+ # try to open the URI. Each protocol signals that it does not handle that
694
+ # URI by raising a DRbBadScheme error. If no protocol recognises the
695
+ # URI, then a DRbBadURI error is raised. If a protocol accepts the
696
+ # URI, but an error occurs in opening it, a DRbConnError is raised.
697
+ #
698
+ # @raise [DRbBadURI]
699
+ #
700
+ # source://drb//lib/drb/drb.rb#736
701
+ def open(uri, config, first = T.unsafe(nil)); end
702
+
703
+ # Open a server listening for connections at +uri+ with
704
+ # configuration +config+.
705
+ #
706
+ # The DRbProtocol module asks each registered protocol in turn to
707
+ # try to open a server at the URI. Each protocol signals that it does
708
+ # not handle that URI by raising a DRbBadScheme error. If no protocol
709
+ # recognises the URI, then a DRbBadURI error is raised. If a protocol
710
+ # accepts the URI, but an error occurs in opening it, the underlying
711
+ # error is passed on to the caller.
712
+ #
713
+ # @raise [DRbBadURI]
714
+ #
715
+ # source://drb//lib/drb/drb.rb#764
716
+ def open_server(uri, config, first = T.unsafe(nil)); end
717
+
718
+ # Parse +uri+ into a [uri, option] pair.
719
+ #
720
+ # The DRbProtocol module asks each registered protocol in turn to
721
+ # try to parse the URI. Each protocol signals that it does not handle that
722
+ # URI by raising a DRbBadScheme error. If no protocol recognises the
723
+ # URI, then a DRbBadURI error is raised.
724
+ #
725
+ # @raise [DRbBadURI]
726
+ #
727
+ # source://drb//lib/drb/drb.rb#785
728
+ def uri_option(uri, config, first = T.unsafe(nil)); end
729
+ end
730
+ end
731
+
732
+ # An exception wrapping an error object
733
+ #
734
+ # source://drb//lib/drb/drb.rb#431
735
+ class DRb::DRbRemoteError < ::DRb::DRbError
736
+ # Creates a new remote error that wraps the Exception +error+
737
+ #
738
+ # @return [DRbRemoteError] a new instance of DRbRemoteError
739
+ #
740
+ # source://drb//lib/drb/drb.rb#434
741
+ def initialize(error); end
742
+
743
+ # the class of the error, as a string.
744
+ #
745
+ # source://drb//lib/drb/drb.rb#441
746
+ def reason; end
747
+ end
748
+
749
+ # source://drb//lib/drb/drb.rb#1350
750
+ class DRb::DRbServer
751
+ # Create a new DRbServer instance.
752
+ #
753
+ # +uri+ is the URI to bind to. This is normally of the form
754
+ # 'druby://<hostname>:<port>' where <hostname> is a hostname of
755
+ # the local machine. If nil, then the system's default hostname
756
+ # will be bound to, on a port selected by the system; these value
757
+ # can be retrieved from the +uri+ attribute. 'druby:' specifies
758
+ # the default dRuby transport protocol: another protocol, such
759
+ # as 'drbunix:', can be specified instead.
760
+ #
761
+ # +front+ is the front object for the server, that is, the object
762
+ # to which remote method calls on the server will be passed. If
763
+ # nil, then the server will not accept remote method calls.
764
+ #
765
+ # If +config_or_acl+ is a hash, it is the configuration to
766
+ # use for this server. The following options are recognised:
767
+ #
768
+ # :idconv :: an id-to-object conversion object. This defaults
769
+ # to an instance of the class DRb::DRbIdConv.
770
+ # :verbose :: if true, all unsuccessful remote calls on objects
771
+ # in the server will be logged to $stdout. false
772
+ # by default.
773
+ # :tcp_acl :: the access control list for this server. See
774
+ # the ACL class from the main dRuby distribution.
775
+ # :load_limit :: the maximum message size in bytes accepted by
776
+ # the server. Defaults to 25 MB (26214400).
777
+ # :argc_limit :: the maximum number of arguments to a remote
778
+ # method accepted by the server. Defaults to
779
+ # 256.
780
+ # The default values of these options can be modified on
781
+ # a class-wide basis by the class methods #default_argc_limit,
782
+ # #default_load_limit, #default_acl, #default_id_conv,
783
+ # and #verbose=
784
+ #
785
+ # If +config_or_acl+ is not a hash, but is not nil, it is
786
+ # assumed to be the access control list for this server.
787
+ # See the :tcp_acl option for more details.
788
+ #
789
+ # If no other server is currently set as the primary server,
790
+ # this will become the primary server.
791
+ #
792
+ # The server will immediately start running in its own thread.
793
+ #
794
+ # @return [DRbServer] a new instance of DRbServer
795
+ #
796
+ # source://drb//lib/drb/drb.rb#1451
797
+ def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end
798
+
799
+ # Is this server alive?
800
+ #
801
+ # @return [Boolean]
802
+ #
803
+ # source://drb//lib/drb/drb.rb#1506
804
+ def alive?; end
805
+
806
+ # Check that a method is callable via dRuby.
807
+ #
808
+ # +obj+ is the object we want to invoke the method on. +msg_id+ is the
809
+ # method name, as a Symbol.
810
+ #
811
+ # If the method is an insecure method (see #insecure_method?) a
812
+ # SecurityError is thrown. If the method is private or undefined,
813
+ # a NameError is thrown.
814
+ #
815
+ # @raise [ArgumentError]
816
+ #
817
+ # source://drb//lib/drb/drb.rb#1594
818
+ def check_insecure_method(obj, msg_id); end
819
+
820
+ # The configuration of this DRbServer
821
+ #
822
+ # source://drb//lib/drb/drb.rb#1493
823
+ def config; end
824
+
825
+ # The front object of the DRbServer.
826
+ #
827
+ # This object receives remote method calls made on the server's
828
+ # URI alone, with an object id.
829
+ #
830
+ # source://drb//lib/drb/drb.rb#1490
831
+ def front; end
832
+
833
+ # Is +uri+ the URI for this server?
834
+ #
835
+ # @return [Boolean]
836
+ #
837
+ # source://drb//lib/drb/drb.rb#1511
838
+ def here?(uri); end
839
+
840
+ # Stop this server.
841
+ #
842
+ # source://drb//lib/drb/drb.rb#1516
843
+ def stop_service; end
844
+
845
+ # The main thread of this DRbServer.
846
+ #
847
+ # This is the thread that listens for and accepts connections
848
+ # from clients, not that handles each client's request-response
849
+ # session.
850
+ #
851
+ # source://drb//lib/drb/drb.rb#1484
852
+ def thread; end
853
+
854
+ # Convert a local object to a dRuby reference.
855
+ #
856
+ # source://drb//lib/drb/drb.rb#1533
857
+ def to_id(obj); end
858
+
859
+ # Convert a dRuby reference to the local object it refers to.
860
+ #
861
+ # source://drb//lib/drb/drb.rb#1526
862
+ def to_obj(ref); end
863
+
864
+ # The URI of this DRbServer.
865
+ #
866
+ # source://drb//lib/drb/drb.rb#1477
867
+ def uri; end
868
+
869
+ # Get whether the server is in verbose mode.
870
+ #
871
+ # In verbose mode, failed calls are logged to stdout.
872
+ #
873
+ # source://drb//lib/drb/drb.rb#1503
874
+ def verbose; end
875
+
876
+ # Set whether to operate in verbose mode.
877
+ #
878
+ # In verbose mode, failed calls are logged to stdout.
879
+ #
880
+ # source://drb//lib/drb/drb.rb#1498
881
+ def verbose=(v); end
882
+
883
+ private
884
+
885
+ # Coerce an object to a string, providing our own representation if
886
+ # to_s is not defined for the object.
887
+ #
888
+ # source://drb//lib/drb/drb.rb#1580
889
+ def any_to_s(obj); end
890
+
891
+ # source://drb//lib/drb/drb.rb#1696
892
+ def error_print(exception); end
893
+
894
+ # Has a method been included in the list of insecure methods?
895
+ #
896
+ # @return [Boolean]
897
+ #
898
+ # source://drb//lib/drb/drb.rb#1574
899
+ def insecure_method?(msg_id); end
900
+
901
+ # The main loop performed by a DRbServer's internal thread.
902
+ #
903
+ # Accepts a connection from a client, and starts up its own
904
+ # thread to handle it. This thread loops, receiving requests
905
+ # from the client, invoking them on a local object, and
906
+ # returning responses, until the client closes the connection
907
+ # or a local method call fails.
908
+ #
909
+ # source://drb//lib/drb/drb.rb#1714
910
+ def main_loop; end
911
+
912
+ # Starts the DRb main loop in a new thread.
913
+ #
914
+ # source://drb//lib/drb/drb.rb#1555
915
+ def run; end
916
+
917
+ # source://drb//lib/drb/drb.rb#1540
918
+ def shutdown; end
919
+
920
+ class << self
921
+ # Set the default access control list to +acl+. The default ACL is +nil+.
922
+ #
923
+ # See also DRb::ACL and #new()
924
+ #
925
+ # source://drb//lib/drb/drb.rb#1375
926
+ def default_acl(acl); end
927
+
928
+ # Set the default value for the :argc_limit option.
929
+ #
930
+ # See #new(). The initial default value is 256.
931
+ #
932
+ # source://drb//lib/drb/drb.rb#1361
933
+ def default_argc_limit(argc); end
934
+
935
+ # Set the default value for the :id_conv option.
936
+ #
937
+ # See #new(). The initial default value is a DRbIdConv instance.
938
+ #
939
+ # source://drb//lib/drb/drb.rb#1382
940
+ def default_id_conv(idconv); end
941
+
942
+ # Set the default value for the :load_limit option.
943
+ #
944
+ # See #new(). The initial default value is 25 MB.
945
+ #
946
+ # source://drb//lib/drb/drb.rb#1368
947
+ def default_load_limit(sz); end
948
+
949
+ # source://drb//lib/drb/drb.rb#1398
950
+ def make_config(hash = T.unsafe(nil)); end
951
+
952
+ # Get the default value of the :verbose option.
953
+ #
954
+ # source://drb//lib/drb/drb.rb#1394
955
+ def verbose; end
956
+
957
+ # Set the default value of the :verbose option.
958
+ #
959
+ # See #new(). The initial default value is false.
960
+ #
961
+ # source://drb//lib/drb/drb.rb#1389
962
+ def verbose=(on); end
963
+ end
964
+ end
965
+
966
+ # source://drb//lib/drb/drb.rb#1624
967
+ class DRb::DRbServer::InvokeMethod
968
+ include ::DRb::DRbServer::InvokeMethod18Mixin
969
+
970
+ # @return [InvokeMethod] a new instance of InvokeMethod
971
+ #
972
+ # source://drb//lib/drb/drb.rb#1625
973
+ def initialize(drb_server, client); end
974
+
975
+ # source://drb//lib/drb/drb.rb#1630
976
+ def perform; end
977
+
978
+ private
979
+
980
+ # source://drb//lib/drb/drb.rb#1667
981
+ def check_insecure_method; end
982
+
983
+ # source://drb//lib/drb/drb.rb#1659
984
+ def init_with_client; end
985
+
986
+ # source://drb//lib/drb/drb.rb#1676
987
+ def perform_without_block; end
988
+
989
+ # source://drb//lib/drb/drb.rb#1671
990
+ def setup_message; end
991
+ end
992
+
993
+ # source://drb//lib/drb/invokemethod.rb#6
994
+ module DRb::DRbServer::InvokeMethod18Mixin
995
+ # source://drb//lib/drb/invokemethod.rb#7
996
+ def block_yield(x); end
997
+
998
+ # source://drb//lib/drb/invokemethod.rb#14
999
+ def perform_with_block; end
1000
+ end
1001
+
1002
+ # The default drb protocol which communicates over a TCP socket.
1003
+ #
1004
+ # The DRb TCP protocol URI looks like:
1005
+ # <code>druby://<host>:<port>?<option></code>. The option is optional.
1006
+ #
1007
+ # source://drb//lib/drb/drb.rb#815
1008
+ class DRb::DRbTCPSocket
1009
+ # Create a new DRbTCPSocket instance.
1010
+ #
1011
+ # +uri+ is the URI we are connected to.
1012
+ # +soc+ is the tcp socket we are bound to. +config+ is our
1013
+ # configuration.
1014
+ #
1015
+ # @return [DRbTCPSocket] a new instance of DRbTCPSocket
1016
+ #
1017
+ # source://drb//lib/drb/drb.rb#903
1018
+ def initialize(uri, soc, config = T.unsafe(nil)); end
1019
+
1020
+ # On the server side, for an instance returned by #open_server,
1021
+ # accept a client connection and return a new instance to handle
1022
+ # the server's side of this client-server session.
1023
+ #
1024
+ # source://drb//lib/drb/drb.rb#971
1025
+ def accept; end
1026
+
1027
+ # Check to see if this connection is alive.
1028
+ #
1029
+ # @return [Boolean]
1030
+ #
1031
+ # source://drb//lib/drb/drb.rb#1001
1032
+ def alive?; end
1033
+
1034
+ # Close the connection.
1035
+ #
1036
+ # If this is an instance returned by #open_server, then this stops
1037
+ # listening for new connections altogether. If this is an instance
1038
+ # returned by #open or by #accept, then it closes this particular
1039
+ # client-server session.
1040
+ #
1041
+ # source://drb//lib/drb/drb.rb#953
1042
+ def close; end
1043
+
1044
+ # Get the address of our TCP peer (the other end of the socket
1045
+ # we are bound to.
1046
+ #
1047
+ # source://drb//lib/drb/drb.rb#918
1048
+ def peeraddr; end
1049
+
1050
+ # On the client side, receive a reply from the server.
1051
+ #
1052
+ # source://drb//lib/drb/drb.rb#941
1053
+ def recv_reply; end
1054
+
1055
+ # On the server side, receive a request from the client.
1056
+ #
1057
+ # source://drb//lib/drb/drb.rb#931
1058
+ def recv_request; end
1059
+
1060
+ # On the server side, send a reply to the client.
1061
+ #
1062
+ # source://drb//lib/drb/drb.rb#936
1063
+ def send_reply(succ, result); end
1064
+
1065
+ # On the client side, send a request to the server.
1066
+ #
1067
+ # source://drb//lib/drb/drb.rb#926
1068
+ def send_request(ref, msg_id, arg, b); end
1069
+
1070
+ # source://drb//lib/drb/drb.rb#1010
1071
+ def set_sockopt(soc); end
1072
+
1073
+ # Graceful shutdown
1074
+ #
1075
+ # source://drb//lib/drb/drb.rb#996
1076
+ def shutdown; end
1077
+
1078
+ # Get the socket.
1079
+ #
1080
+ # source://drb//lib/drb/drb.rb#923
1081
+ def stream; end
1082
+
1083
+ # Get the URI that we are connected to.
1084
+ #
1085
+ # source://drb//lib/drb/drb.rb#914
1086
+ def uri; end
1087
+
1088
+ private
1089
+
1090
+ # source://drb//lib/drb/drb.rb#986
1091
+ def accept_or_shutdown; end
1092
+
1093
+ # source://drb//lib/drb/drb.rb#962
1094
+ def close_shutdown_pipe; end
1095
+
1096
+ class << self
1097
+ # Returns the hostname of this server
1098
+ #
1099
+ # source://drb//lib/drb/drb.rb#845
1100
+ def getservername; end
1101
+
1102
+ # Open a client connection to +uri+ (DRb URI string) using configuration
1103
+ # +config+.
1104
+ #
1105
+ # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
1106
+ # recognized protocol. See DRb::DRbServer.new for information on built-in
1107
+ # URI protocols.
1108
+ #
1109
+ # source://drb//lib/drb/drb.rb#838
1110
+ def open(uri, config); end
1111
+
1112
+ # Open a server listening for connections at +uri+ using
1113
+ # configuration +config+.
1114
+ #
1115
+ # source://drb//lib/drb/drb.rb#876
1116
+ def open_server(uri, config); end
1117
+
1118
+ # For the families available for +host+, returns a TCPServer on +port+.
1119
+ # If +port+ is 0 the first available port is used. IPv4 servers are
1120
+ # preferred over IPv6 servers.
1121
+ #
1122
+ # source://drb//lib/drb/drb.rb#861
1123
+ def open_server_inaddr_any(host, port); end
1124
+
1125
+ # source://drb//lib/drb/drb.rb#818
1126
+ def parse_uri(uri); end
1127
+
1128
+ # Parse +uri+ into a [uri, option] pair.
1129
+ #
1130
+ # source://drb//lib/drb/drb.rb#893
1131
+ def uri_option(uri, config); end
1132
+ end
1133
+ end
1134
+
1135
+ # Implements DRb over a UNIX socket
1136
+ #
1137
+ # DRb UNIX socket URIs look like <code>drbunix:<path>?<option></code>. The
1138
+ # option is optional.
1139
+ #
1140
+ # source://drb//lib/drb/unix.rb#15
1141
+ class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket
1142
+ # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket
1143
+ #
1144
+ # source://drb//lib/drb/unix.rb#62
1145
+ def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end
1146
+
1147
+ # source://drb//lib/drb/unix.rb#105
1148
+ def accept; end
1149
+
1150
+ # source://drb//lib/drb/unix.rb#95
1151
+ def close; end
1152
+
1153
+ # source://drb//lib/drb/unix.rb#111
1154
+ def set_sockopt(soc); end
1155
+
1156
+ class << self
1157
+ # source://drb//lib/drb/unix.rb#28
1158
+ def open(uri, config); end
1159
+
1160
+ # source://drb//lib/drb/unix.rb#34
1161
+ def open_server(uri, config); end
1162
+
1163
+ # :stopdoc:
1164
+ #
1165
+ # source://drb//lib/drb/unix.rb#17
1166
+ def parse_uri(uri); end
1167
+
1168
+ # source://drb//lib/drb/unix.rb#72
1169
+ def temp_server; end
1170
+
1171
+ # source://drb//lib/drb/unix.rb#57
1172
+ def uri_option(uri, config); end
1173
+ end
1174
+ end
1175
+
1176
+ # import from tempfile.rb
1177
+ #
1178
+ # source://drb//lib/drb/unix.rb#70
1179
+ DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer)
1180
+
1181
+ # source://drb//lib/drb/drb.rb#1021
1182
+ class DRb::DRbURIOption
1183
+ # @return [DRbURIOption] a new instance of DRbURIOption
1184
+ #
1185
+ # source://drb//lib/drb/drb.rb#1022
1186
+ def initialize(option); end
1187
+
1188
+ # source://drb//lib/drb/drb.rb#1028
1189
+ def ==(other); end
1190
+
1191
+ # source://drb//lib/drb/drb.rb#1028
1192
+ def eql?(other); end
1193
+
1194
+ # source://drb//lib/drb/drb.rb#1033
1195
+ def hash; end
1196
+
1197
+ # Returns the value of attribute option.
1198
+ #
1199
+ # source://drb//lib/drb/drb.rb#1025
1200
+ def option; end
1201
+
1202
+ # source://drb//lib/drb/drb.rb#1026
1203
+ def to_s; end
1204
+ end
1205
+
1206
+ # Mixin module making an object undumpable or unmarshallable.
1207
+ #
1208
+ # If an object which includes this module is returned by method
1209
+ # called over drb, then the object remains in the server space
1210
+ # and a reference to the object is returned, rather than the
1211
+ # object being marshalled and moved into the client space.
1212
+ #
1213
+ # source://drb//lib/drb/drb.rb#390
1214
+ module DRb::DRbUndumped
1215
+ # @raise [TypeError]
1216
+ #
1217
+ # source://drb//lib/drb/drb.rb#391
1218
+ def _dump(dummy); end
1219
+ end
1220
+
1221
+ # Class wrapping a marshalled object whose type is unknown locally.
1222
+ #
1223
+ # If an object is returned by a method invoked over drb, but the
1224
+ # class of the object is unknown in the client namespace, or
1225
+ # the object is a constant unknown in the client namespace, then
1226
+ # the still-marshalled object is returned wrapped in a DRbUnknown instance.
1227
+ #
1228
+ # If this object is passed as an argument to a method invoked over
1229
+ # drb, then the wrapped object is passed instead.
1230
+ #
1231
+ # The class or constant name of the object can be read from the
1232
+ # +name+ attribute. The marshalled object is held in the +buf+
1233
+ # attribute.
1234
+ #
1235
+ # source://drb//lib/drb/drb.rb#457
1236
+ class DRb::DRbUnknown
1237
+ # Create a new DRbUnknown object.
1238
+ #
1239
+ # +buf+ is a string containing a marshalled object that could not
1240
+ # be unmarshalled. +err+ is the error message that was raised
1241
+ # when the unmarshalling failed. It is used to determine the
1242
+ # name of the unmarshalled object.
1243
+ #
1244
+ # @return [DRbUnknown] a new instance of DRbUnknown
1245
+ #
1246
+ # source://drb//lib/drb/drb.rb#465
1247
+ def initialize(err, buf); end
1248
+
1249
+ # source://drb//lib/drb/drb.rb#494
1250
+ def _dump(lv); end
1251
+
1252
+ # Buffer contained the marshalled, unknown object.
1253
+ #
1254
+ # source://drb//lib/drb/drb.rb#484
1255
+ def buf; end
1256
+
1257
+ # Create a DRbUnknownError exception containing this object.
1258
+ #
1259
+ # source://drb//lib/drb/drb.rb#508
1260
+ def exception; end
1261
+
1262
+ # The name of the unknown thing.
1263
+ #
1264
+ # Class name for unknown objects; variable name for unknown
1265
+ # constants.
1266
+ #
1267
+ # source://drb//lib/drb/drb.rb#481
1268
+ def name; end
1269
+
1270
+ # Attempt to load the wrapped marshalled object again.
1271
+ #
1272
+ # If the class of the object is now known locally, the object
1273
+ # will be unmarshalled and returned. Otherwise, a new
1274
+ # but identical DRbUnknown object will be returned.
1275
+ #
1276
+ # source://drb//lib/drb/drb.rb#503
1277
+ def reload; end
1278
+
1279
+ class << self
1280
+ # source://drb//lib/drb/drb.rb#486
1281
+ def _load(s); end
1282
+ end
1283
+ end
1284
+
1285
+ # An exception wrapping a DRb::DRbUnknown object
1286
+ #
1287
+ # source://drb//lib/drb/drb.rb#410
1288
+ class DRb::DRbUnknownError < ::DRb::DRbError
1289
+ # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
1290
+ #
1291
+ # @return [DRbUnknownError] a new instance of DRbUnknownError
1292
+ #
1293
+ # source://drb//lib/drb/drb.rb#413
1294
+ def initialize(unknown); end
1295
+
1296
+ # source://drb//lib/drb/drb.rb#425
1297
+ def _dump(lv); end
1298
+
1299
+ # Get the wrapped DRb::DRbUnknown object.
1300
+ #
1301
+ # source://drb//lib/drb/drb.rb#419
1302
+ def unknown; end
1303
+
1304
+ class << self
1305
+ # source://drb//lib/drb/drb.rb#421
1306
+ def _load(s); end
1307
+ end
1308
+ end
1309
+
1310
+ # source://drb//lib/drb/drb.rb#1199
1311
+ class DRb::ThreadObject
1312
+ include ::MonitorMixin
1313
+
1314
+ # @return [ThreadObject] a new instance of ThreadObject
1315
+ #
1316
+ # source://drb//lib/drb/drb.rb#1202
1317
+ def initialize(&blk); end
1318
+
1319
+ # source://drb//lib/drb/drb.rb#1237
1320
+ def _execute; end
1321
+
1322
+ # @return [Boolean]
1323
+ #
1324
+ # source://drb//lib/drb/drb.rb#1213
1325
+ def alive?; end
1326
+
1327
+ # source://drb//lib/drb/drb.rb#1217
1328
+ def kill; end
1329
+
1330
+ # source://drb//lib/drb/drb.rb#1222
1331
+ def method_missing(msg, *arg, &blk); end
1332
+ end
1333
+
1334
+ # source://drb//lib/drb/version.rb#2
1335
+ DRb::VERSION = T.let(T.unsafe(nil), String)
1336
+
1337
+ # source://drb//lib/drb/drb.rb#1943
1338
+ DRbIdConv = DRb::DRbIdConv
1339
+
1340
+ # :stopdoc:
1341
+ #
1342
+ # source://drb//lib/drb/drb.rb#1941
1343
+ DRbObject = DRb::DRbObject
1344
+
1345
+ # source://drb//lib/drb/drb.rb#1942
1346
+ DRbUndumped = DRb::DRbUndumped