ori-rb 0.4

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 (84) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +8 -0
  3. data/.ruby-version +1 -0
  4. data/LICENSE +9 -0
  5. data/README.md +444 -0
  6. data/Rakefile +17 -0
  7. data/docs/images/example_boundary.png +0 -0
  8. data/docs/images/example_boundary_cancellation.png +0 -0
  9. data/docs/images/example_channel.png +0 -0
  10. data/docs/images/example_mutex.png +0 -0
  11. data/docs/images/example_promise.png +0 -0
  12. data/docs/images/example_semaphore.png +0 -0
  13. data/docs/images/example_trace.png +0 -0
  14. data/docs/images/example_trace_tag.png +0 -0
  15. data/lib/ori/channel.rb +148 -0
  16. data/lib/ori/lazy.rb +163 -0
  17. data/lib/ori/mutex.rb +9 -0
  18. data/lib/ori/out/index.html +146 -0
  19. data/lib/ori/out/script.js +3 -0
  20. data/lib/ori/promise.rb +39 -0
  21. data/lib/ori/reentrant_semaphore.rb +68 -0
  22. data/lib/ori/scope.rb +620 -0
  23. data/lib/ori/select.rb +35 -0
  24. data/lib/ori/selectable.rb +9 -0
  25. data/lib/ori/semaphore.rb +49 -0
  26. data/lib/ori/task.rb +78 -0
  27. data/lib/ori/timeout.rb +16 -0
  28. data/lib/ori/tracer.rb +335 -0
  29. data/lib/ori/version.rb +5 -0
  30. data/lib/ori.rb +68 -0
  31. data/mise-tasks/test +15 -0
  32. data/mise.toml +40 -0
  33. data/sorbet/config +8 -0
  34. data/sorbet/rbi/gems/.gitattributes +1 -0
  35. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  36. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  37. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  38. data/sorbet/rbi/gems/erb@5.1.1.rbi +845 -0
  39. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  40. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  41. data/sorbet/rbi/gems/json@2.15.1.rbi +2101 -0
  42. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  43. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  44. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  45. data/sorbet/rbi/gems/minitest@5.26.0.rbi +2234 -0
  46. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  47. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +293 -0
  48. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  49. data/sorbet/rbi/gems/parser@3.3.9.0.rbi +5535 -0
  50. data/sorbet/rbi/gems/pp@0.6.3.rbi +376 -0
  51. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  52. data/sorbet/rbi/gems/prism@1.5.2.rbi +42056 -0
  53. data/sorbet/rbi/gems/psych@5.2.6.rbi +2469 -0
  54. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  55. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  56. data/sorbet/rbi/gems/rake@13.3.0.rbi +3036 -0
  57. data/sorbet/rbi/gems/rbi@0.3.7.rbi +7115 -0
  58. data/sorbet/rbi/gems/rbs@3.9.5.rbi +6978 -0
  59. data/sorbet/rbi/gems/rdoc@6.15.0.rbi +12777 -0
  60. data/sorbet/rbi/gems/regexp_parser@2.11.3.rbi +3845 -0
  61. data/sorbet/rbi/gems/reline@0.6.2.rbi +9 -0
  62. data/sorbet/rbi/gems/rexml@3.4.4.rbi +5285 -0
  63. data/sorbet/rbi/gems/rubocop-ast@1.47.1.rbi +7780 -0
  64. data/sorbet/rbi/gems/rubocop-shopify@2.17.1.rbi +9 -0
  65. data/sorbet/rbi/gems/rubocop-sorbet@0.11.0.rbi +2506 -0
  66. data/sorbet/rbi/gems/rubocop@1.81.1.rbi +63489 -0
  67. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  68. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  69. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  70. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  71. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  72. data/sorbet/rbi/gems/tsort@0.2.0.rbi +393 -0
  73. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +132 -0
  74. data/sorbet/rbi/gems/unicode-emoji@4.1.0.rbi +251 -0
  75. data/sorbet/rbi/gems/vernier@1.8.1-96ce5c739bfe6a18d2f4393f4219a1bf48674b87.rbi +904 -0
  76. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  77. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  78. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1429 -0
  79. data/sorbet/shims/fiber.rbi +21 -0
  80. data/sorbet/shims/io.rbi +8 -0
  81. data/sorbet/shims/random.rbi +9 -0
  82. data/sorbet/shims/rdoc.rbi +3 -0
  83. data/sorbet/tapioca/require.rb +7 -0
  84. metadata +169 -0
@@ -0,0 +1,2469 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `psych` gem.
5
+ # Please instead update this file by running `bin/tapioca gem psych`.
6
+
7
+
8
+ # source://psych//lib/psych/core_ext.rb#2
9
+ class Object < ::BasicObject
10
+ include ::Kernel
11
+ include ::PP::ObjectMixin
12
+
13
+ # call-seq: to_yaml(options = {})
14
+ #
15
+ # Convert an object to YAML. See Psych.dump for more information on the
16
+ # available +options+.
17
+ #
18
+ # source://psych//lib/psych/core_ext.rb#12
19
+ def to_yaml(options = T.unsafe(nil)); end
20
+
21
+ class << self
22
+ # source://psych//lib/psych/core_ext.rb#3
23
+ def yaml_tag(url); end
24
+ end
25
+ end
26
+
27
+ # = Overview
28
+ #
29
+ # Psych is a YAML parser and emitter.
30
+ # Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML]
31
+ # or [git repo: https://github.com/yaml/libyaml] for its YAML parsing
32
+ # and emitting capabilities. In addition to wrapping libyaml, Psych also
33
+ # knows how to serialize and de-serialize most Ruby objects to and from
34
+ # the YAML format.
35
+ #
36
+ # = I NEED TO PARSE OR EMIT YAML RIGHT NOW!
37
+ #
38
+ # # Parse some YAML
39
+ # Psych.load("--- foo") # => "foo"
40
+ #
41
+ # # Emit some YAML
42
+ # Psych.dump("foo") # => "--- foo\n...\n"
43
+ # { :a => 'b'}.to_yaml # => "---\n:a: b\n"
44
+ #
45
+ # Got more time on your hands? Keep on reading!
46
+ #
47
+ # == YAML Parsing
48
+ #
49
+ # Psych provides a range of interfaces for parsing a YAML document ranging from
50
+ # low level to high level, depending on your parsing needs. At the lowest
51
+ # level, is an event based parser. Mid level is access to the raw YAML AST,
52
+ # and at the highest level is the ability to unmarshal YAML to Ruby objects.
53
+ #
54
+ # == YAML Emitting
55
+ #
56
+ # Psych provides a range of interfaces ranging from low to high level for
57
+ # producing YAML documents. Very similar to the YAML parsing interfaces, Psych
58
+ # provides at the lowest level, an event based system, mid-level is building
59
+ # a YAML AST, and the highest level is converting a Ruby object straight to
60
+ # a YAML document.
61
+ #
62
+ # == High-level API
63
+ #
64
+ # === Parsing
65
+ #
66
+ # The high level YAML parser provided by Psych simply takes YAML as input and
67
+ # returns a Ruby data structure. For information on using the high level parser
68
+ # see Psych.load
69
+ #
70
+ # ==== Reading from a string
71
+ #
72
+ # Psych.safe_load("--- a") # => 'a'
73
+ # Psych.safe_load("---\n - a\n - b") # => ['a', 'b']
74
+ # # From a trusted string:
75
+ # Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42
76
+ #
77
+ # ==== Reading from a file
78
+ #
79
+ # Psych.safe_load_file("data.yml", permitted_classes: [Date])
80
+ # Psych.load_file("trusted_database.yml")
81
+ #
82
+ # ==== \Exception handling
83
+ #
84
+ # begin
85
+ # # The second argument changes only the exception contents
86
+ # Psych.parse("--- `", "file.txt")
87
+ # rescue Psych::SyntaxError => ex
88
+ # ex.file # => 'file.txt'
89
+ # ex.message # => "(file.txt): found character that cannot start any token"
90
+ # end
91
+ #
92
+ # === Emitting
93
+ #
94
+ # The high level emitter has the easiest interface. Psych simply takes a Ruby
95
+ # data structure and converts it to a YAML document. See Psych.dump for more
96
+ # information on dumping a Ruby data structure.
97
+ #
98
+ # ==== Writing to a string
99
+ #
100
+ # # Dump an array, get back a YAML string
101
+ # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
102
+ #
103
+ # # Dump an array to an IO object
104
+ # Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
105
+ #
106
+ # # Dump an array with indentation set
107
+ # Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n"
108
+ #
109
+ # # Dump an array to an IO with indentation set
110
+ # Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
111
+ #
112
+ # ==== Writing to a file
113
+ #
114
+ # Currently there is no direct API for dumping Ruby structure to file:
115
+ #
116
+ # File.open('database.yml', 'w') do |file|
117
+ # file.write(Psych.dump(['a', 'b']))
118
+ # end
119
+ #
120
+ # == Mid-level API
121
+ #
122
+ # === Parsing
123
+ #
124
+ # Psych provides access to an AST produced from parsing a YAML document. This
125
+ # tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can
126
+ # be examined and manipulated freely. Please see Psych::parse_stream,
127
+ # Psych::Nodes, and Psych::Nodes::Node for more information on dealing with
128
+ # YAML syntax trees.
129
+ #
130
+ # ==== Reading from a string
131
+ #
132
+ # # Returns Psych::Nodes::Stream
133
+ # Psych.parse_stream("---\n - a\n - b")
134
+ #
135
+ # # Returns Psych::Nodes::Document
136
+ # Psych.parse("---\n - a\n - b")
137
+ #
138
+ # ==== Reading from a file
139
+ #
140
+ # # Returns Psych::Nodes::Stream
141
+ # Psych.parse_stream(File.read('database.yml'))
142
+ #
143
+ # # Returns Psych::Nodes::Document
144
+ # Psych.parse_file('database.yml')
145
+ #
146
+ # ==== \Exception handling
147
+ #
148
+ # begin
149
+ # # The second argument changes only the exception contents
150
+ # Psych.parse("--- `", "file.txt")
151
+ # rescue Psych::SyntaxError => ex
152
+ # ex.file # => 'file.txt'
153
+ # ex.message # => "(file.txt): found character that cannot start any token"
154
+ # end
155
+ #
156
+ # === Emitting
157
+ #
158
+ # At the mid level is building an AST. This AST is exactly the same as the AST
159
+ # used when parsing a YAML document. Users can build an AST by hand and the
160
+ # AST knows how to emit itself as a YAML document. See Psych::Nodes,
161
+ # Psych::Nodes::Node, and Psych::TreeBuilder for more information on building
162
+ # a YAML AST.
163
+ #
164
+ # ==== Writing to a string
165
+ #
166
+ # # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
167
+ # stream = Psych.parse_stream("---\n - a\n - b")
168
+ #
169
+ # stream.to_yaml # => "---\n- a\n- b\n"
170
+ #
171
+ # ==== Writing to a file
172
+ #
173
+ # # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
174
+ # stream = Psych.parse_stream(File.read('database.yml'))
175
+ #
176
+ # File.open('database.yml', 'w') do |file|
177
+ # file.write(stream.to_yaml)
178
+ # end
179
+ #
180
+ # == Low-level API
181
+ #
182
+ # === Parsing
183
+ #
184
+ # The lowest level parser should be used when the YAML input is already known,
185
+ # and the developer does not want to pay the price of building an AST or
186
+ # automatic detection and conversion to Ruby objects. See Psych::Parser for
187
+ # more information on using the event based parser.
188
+ #
189
+ # ==== Reading to Psych::Nodes::Stream structure
190
+ #
191
+ # parser = Psych::Parser.new(TreeBuilder.new) # => #<Psych::Parser>
192
+ # parser = Psych.parser # it's an alias for the above
193
+ #
194
+ # parser.parse("---\n - a\n - b") # => #<Psych::Parser>
195
+ # parser.handler # => #<Psych::TreeBuilder>
196
+ # parser.handler.root # => #<Psych::Nodes::Stream>
197
+ #
198
+ # ==== Receiving an events stream
199
+ #
200
+ # recorder = Psych::Handlers::Recorder.new
201
+ # parser = Psych::Parser.new(recorder)
202
+ #
203
+ # parser.parse("---\n - a\n - b")
204
+ # recorder.events # => [list of [event, args] lists]
205
+ # # event is one of: Psych::Handler::EVENTS
206
+ # # args are the arguments passed to the event
207
+ #
208
+ # === Emitting
209
+ #
210
+ # The lowest level emitter is an event based system. Events are sent to a
211
+ # Psych::Emitter object. That object knows how to convert the events to a YAML
212
+ # document. This interface should be used when document format is known in
213
+ # advance or speed is a concern. See Psych::Emitter for more information.
214
+ #
215
+ # ==== Writing to a Ruby structure
216
+ #
217
+ # Psych.parser.parse("--- a") # => #<Psych::Parser>
218
+ #
219
+ # parser.handler.first # => #<Psych::Nodes::Stream>
220
+ # parser.handler.first.to_ruby # => ["a"]
221
+ #
222
+ # parser.handler.root.first # => #<Psych::Nodes::Document>
223
+ # parser.handler.root.first.to_ruby # => "a"
224
+ #
225
+ # # You can instantiate an Emitter manually
226
+ # Psych::Visitors::ToRuby.new.accept(parser.handler.root.first)
227
+ # # => "a"
228
+ #
229
+ # source://psych//lib/psych/versions.rb#3
230
+ module Psych
231
+ class << self
232
+ # source://psych//lib/psych.rb#728
233
+ def add_builtin_type(type_tag, &block); end
234
+
235
+ # :stopdoc:
236
+ #
237
+ # source://psych//lib/psych.rb#722
238
+ def add_domain_type(domain, type_tag, &block); end
239
+
240
+ # source://psych//lib/psych.rb#738
241
+ def add_tag(tag, klass); end
242
+
243
+ # source://psych//lib/psych.rb#754
244
+ def config; end
245
+
246
+ # source://psych//lib/psych.rb#766
247
+ def domain_types; end
248
+
249
+ # source://psych//lib/psych.rb#778
250
+ def domain_types=(value); end
251
+
252
+ # call-seq:
253
+ # Psych.dump(o) -> string of yaml
254
+ # Psych.dump(o, options) -> string of yaml
255
+ # Psych.dump(o, io) -> io object passed in
256
+ # Psych.dump(o, io, options) -> io object passed in
257
+ #
258
+ # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in
259
+ # to control the output format. If an IO object is passed in, the YAML will
260
+ # be dumped to that IO object.
261
+ #
262
+ # Currently supported options are:
263
+ #
264
+ # [<tt>:indentation</tt>] Number of space characters used to indent.
265
+ # Acceptable value should be in <tt>0..9</tt> range,
266
+ # otherwise option is ignored.
267
+ #
268
+ # Default: <tt>2</tt>.
269
+ # [<tt>:line_width</tt>] Max character to wrap line at.
270
+ # For unlimited line width use <tt>-1</tt>.
271
+ #
272
+ # Default: <tt>0</tt> (meaning "wrap at 81").
273
+ # [<tt>:canonical</tt>] Write "canonical" YAML form (very verbose, yet
274
+ # strictly formal).
275
+ #
276
+ # Default: <tt>false</tt>.
277
+ # [<tt>:header</tt>] Write <tt>%YAML [version]</tt> at the beginning of document.
278
+ #
279
+ # Default: <tt>false</tt>.
280
+ #
281
+ # [<tt>:stringify_names</tt>] Dump symbol keys in Hash objects as string.
282
+ #
283
+ # Default: <tt>false</tt>.
284
+ #
285
+ # Example:
286
+ #
287
+ # # Dump an array, get back a YAML string
288
+ # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
289
+ #
290
+ # # Dump an array to an IO object
291
+ # Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
292
+ #
293
+ # # Dump an array with indentation set
294
+ # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
295
+ #
296
+ # # Dump an array to an IO with indentation set
297
+ # Psych.dump(['a', ['b']], StringIO.new, indentation: 3)
298
+ #
299
+ # # Dump hash with symbol keys as string
300
+ # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n"
301
+ #
302
+ # source://psych//lib/psych.rb#514
303
+ def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end
304
+
305
+ # Dump a list of objects as separate documents to a document stream.
306
+ #
307
+ # Example:
308
+ #
309
+ # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n"
310
+ #
311
+ # source://psych//lib/psych.rb#612
312
+ def dump_stream(*objects); end
313
+
314
+ # source://psych//lib/psych.rb#762
315
+ def dump_tags; end
316
+
317
+ # source://psych//lib/psych.rb#774
318
+ def dump_tags=(value); end
319
+
320
+ # Load +yaml+ in to a Ruby data structure. If multiple documents are
321
+ # provided, the object contained in the first document will be returned.
322
+ # +filename+ will be used in the exception message if any exception
323
+ # is raised while parsing. If +yaml+ is empty, it returns
324
+ # the specified +fallback+ return value, which defaults to +nil+.
325
+ #
326
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
327
+ #
328
+ # Example:
329
+ #
330
+ # Psych.load("--- a") # => 'a'
331
+ # Psych.load("---\n - a\n - b") # => ['a', 'b']
332
+ #
333
+ # begin
334
+ # Psych.load("--- `", filename: "file.txt")
335
+ # rescue Psych::SyntaxError => ex
336
+ # ex.file # => 'file.txt'
337
+ # ex.message # => "(file.txt): found character that cannot start any token"
338
+ # end
339
+ #
340
+ # When the optional +symbolize_names+ keyword argument is set to a
341
+ # true value, returns symbols for keys in Hash objects (default: strings).
342
+ #
343
+ # Psych.load("---\n foo: bar") # => {"foo"=>"bar"}
344
+ # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
345
+ #
346
+ # Raises a TypeError when `yaml` parameter is NilClass. This method is
347
+ # similar to `safe_load` except that `Symbol` objects are allowed by default.
348
+ #
349
+ # source://psych//lib/psych.rb#369
350
+ def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
351
+
352
+ # Loads the document contained in +filename+. Returns the yaml contained in
353
+ # +filename+ as a Ruby object, or if the file is empty, it returns
354
+ # the specified +fallback+ return value, which defaults to +nil+.
355
+ # See load for options.
356
+ #
357
+ # source://psych//lib/psych.rb#715
358
+ def load_file(filename, **kwargs); end
359
+
360
+ # Load multiple documents given in +yaml+. Returns the parsed documents
361
+ # as a list. If a block is given, each document will be converted to Ruby
362
+ # and passed to the block during parsing
363
+ #
364
+ # Example:
365
+ #
366
+ # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar']
367
+ #
368
+ # list = []
369
+ # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby|
370
+ # list << ruby
371
+ # end
372
+ # list # => ['foo', 'bar']
373
+ #
374
+ # source://psych//lib/psych.rb#643
375
+ def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end
376
+
377
+ # source://psych//lib/psych.rb#758
378
+ def load_tags; end
379
+
380
+ # source://psych//lib/psych.rb#770
381
+ def load_tags=(value); end
382
+
383
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document.
384
+ # +filename+ is used in the exception message if a Psych::SyntaxError is
385
+ # raised.
386
+ #
387
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
388
+ #
389
+ # Example:
390
+ #
391
+ # Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Document:0x00>
392
+ #
393
+ # begin
394
+ # Psych.parse("--- `", filename: "file.txt")
395
+ # rescue Psych::SyntaxError => ex
396
+ # ex.file # => 'file.txt'
397
+ # ex.message # => "(file.txt): found character that cannot start any token"
398
+ # end
399
+ #
400
+ # See Psych::Nodes for more information about YAML AST.
401
+ #
402
+ # source://psych//lib/psych.rb#399
403
+ def parse(yaml, filename: T.unsafe(nil)); end
404
+
405
+ # Parse a file at +filename+. Returns the Psych::Nodes::Document.
406
+ #
407
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
408
+ #
409
+ # source://psych//lib/psych.rb#411
410
+ def parse_file(filename, fallback: T.unsafe(nil)); end
411
+
412
+ # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream.
413
+ # This method can handle multiple YAML documents contained in +yaml+.
414
+ # +filename+ is used in the exception message if a Psych::SyntaxError is
415
+ # raised.
416
+ #
417
+ # If a block is given, a Psych::Nodes::Document node will be yielded to the
418
+ # block as it's being parsed.
419
+ #
420
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
421
+ #
422
+ # Example:
423
+ #
424
+ # Psych.parse_stream("---\n - a\n - b") # => #<Psych::Nodes::Stream:0x00>
425
+ #
426
+ # Psych.parse_stream("--- a\n--- b") do |node|
427
+ # node # => #<Psych::Nodes::Document:0x00>
428
+ # end
429
+ #
430
+ # begin
431
+ # Psych.parse_stream("--- `", filename: "file.txt")
432
+ # rescue Psych::SyntaxError => ex
433
+ # ex.file # => 'file.txt'
434
+ # ex.message # => "(file.txt): found character that cannot start any token"
435
+ # end
436
+ #
437
+ # Raises a TypeError when NilClass is passed.
438
+ #
439
+ # See Psych::Nodes for more information about YAML AST.
440
+ #
441
+ # source://psych//lib/psych.rb#453
442
+ def parse_stream(yaml, filename: T.unsafe(nil), &block); end
443
+
444
+ # Returns a default parser
445
+ #
446
+ # source://psych//lib/psych.rb#420
447
+ def parser; end
448
+
449
+ # source://psych//lib/psych.rb#734
450
+ def remove_type(type_tag); end
451
+
452
+ # call-seq:
453
+ # Psych.safe_dump(o) -> string of yaml
454
+ # Psych.safe_dump(o, options) -> string of yaml
455
+ # Psych.safe_dump(o, io) -> io object passed in
456
+ # Psych.safe_dump(o, io, options) -> io object passed in
457
+ #
458
+ # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in
459
+ # to control the output format. If an IO object is passed in, the YAML will
460
+ # be dumped to that IO object. By default, only the following
461
+ # classes are allowed to be serialized:
462
+ #
463
+ # * TrueClass
464
+ # * FalseClass
465
+ # * NilClass
466
+ # * Integer
467
+ # * Float
468
+ # * String
469
+ # * Array
470
+ # * Hash
471
+ #
472
+ # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+
473
+ # keyword argument. They are additive. For example, to allow Date serialization:
474
+ #
475
+ # Psych.safe_dump(yaml, permitted_classes: [Date])
476
+ #
477
+ # Now the Date class can be dumped in addition to the classes listed above.
478
+ #
479
+ # A Psych::DisallowedClass exception will be raised if the object contains a
480
+ # class that isn't in the +permitted_classes+ list.
481
+ #
482
+ # Currently supported options are:
483
+ #
484
+ # [<tt>:indentation</tt>] Number of space characters used to indent.
485
+ # Acceptable value should be in <tt>0..9</tt> range,
486
+ # otherwise option is ignored.
487
+ #
488
+ # Default: <tt>2</tt>.
489
+ # [<tt>:line_width</tt>] Max character to wrap line at.
490
+ # For unlimited line width use <tt>-1</tt>.
491
+ #
492
+ # Default: <tt>0</tt> (meaning "wrap at 81").
493
+ # [<tt>:canonical</tt>] Write "canonical" YAML form (very verbose, yet
494
+ # strictly formal).
495
+ #
496
+ # Default: <tt>false</tt>.
497
+ # [<tt>:header</tt>] Write <tt>%YAML [version]</tt> at the beginning of document.
498
+ #
499
+ # Default: <tt>false</tt>.
500
+ #
501
+ # [<tt>:stringify_names</tt>] Dump symbol keys in Hash objects as string.
502
+ #
503
+ # Default: <tt>false</tt>.
504
+ #
505
+ # Example:
506
+ #
507
+ # # Dump an array, get back a YAML string
508
+ # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n"
509
+ #
510
+ # # Dump an array to an IO object
511
+ # Psych.safe_dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
512
+ #
513
+ # # Dump an array with indentation set
514
+ # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
515
+ #
516
+ # # Dump an array to an IO with indentation set
517
+ # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3)
518
+ #
519
+ # # Dump hash with symbol keys as string
520
+ # Psych.dump({a: "b"}, stringify_names: true) # => "---\na: b\n"
521
+ #
522
+ # source://psych//lib/psych.rb#595
523
+ def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end
524
+
525
+ # Safely load the yaml string in +yaml+. By default, only the following
526
+ # classes are allowed to be deserialized:
527
+ #
528
+ # * TrueClass
529
+ # * FalseClass
530
+ # * NilClass
531
+ # * Integer
532
+ # * Float
533
+ # * String
534
+ # * Array
535
+ # * Hash
536
+ #
537
+ # Recursive data structures are not allowed by default. Arbitrary classes
538
+ # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are
539
+ # additive. For example, to allow Date deserialization:
540
+ #
541
+ # Psych.safe_load(yaml, permitted_classes: [Date])
542
+ #
543
+ # Now the Date class can be loaded in addition to the classes listed above.
544
+ #
545
+ # Aliases can be explicitly allowed by changing the +aliases+ keyword argument.
546
+ # For example:
547
+ #
548
+ # x = []
549
+ # x << x
550
+ # yaml = Psych.dump x
551
+ # Psych.safe_load yaml # => raises an exception
552
+ # Psych.safe_load yaml, aliases: true # => loads the aliases
553
+ #
554
+ # A Psych::DisallowedClass exception will be raised if the yaml contains a
555
+ # class that isn't in the +permitted_classes+ list.
556
+ #
557
+ # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases
558
+ # but the +aliases+ keyword argument is set to false.
559
+ #
560
+ # +filename+ will be used in the exception message if any exception is raised
561
+ # while parsing.
562
+ #
563
+ # When the optional +symbolize_names+ keyword argument is set to a
564
+ # true value, returns symbols for keys in Hash objects (default: strings).
565
+ #
566
+ # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"}
567
+ # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
568
+ #
569
+ # source://psych//lib/psych.rb#323
570
+ def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
571
+
572
+ # Safely loads the document contained in +filename+. Returns the yaml contained in
573
+ # +filename+ as a Ruby object, or if the file is empty, it returns
574
+ # the specified +fallback+ return value, which defaults to +nil+.
575
+ # See safe_load for options.
576
+ #
577
+ # source://psych//lib/psych.rb#704
578
+ def safe_load_file(filename, **kwargs); end
579
+
580
+ # Load multiple documents given in +yaml+. Returns the parsed documents
581
+ # as a list.
582
+ #
583
+ # Example:
584
+ #
585
+ # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar']
586
+ #
587
+ # list = []
588
+ # Psych.safe_load_stream("--- foo\n...\n--- bar\n...") do |ruby|
589
+ # list << ruby
590
+ # end
591
+ # list # => ['foo', 'bar']
592
+ #
593
+ # source://psych//lib/psych.rb#670
594
+ def safe_load_stream(yaml, filename: T.unsafe(nil), permitted_classes: T.unsafe(nil), aliases: T.unsafe(nil)); end
595
+
596
+ # Dump Ruby +object+ to a JSON string.
597
+ #
598
+ # source://psych//lib/psych.rb#622
599
+ def to_json(object); end
600
+
601
+ # Load +yaml+ in to a Ruby data structure. If multiple documents are
602
+ # provided, the object contained in the first document will be returned.
603
+ # +filename+ will be used in the exception message if any exception
604
+ # is raised while parsing. If +yaml+ is empty, it returns
605
+ # the specified +fallback+ return value, which defaults to +false+.
606
+ #
607
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
608
+ #
609
+ # Example:
610
+ #
611
+ # Psych.unsafe_load("--- a") # => 'a'
612
+ # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b']
613
+ #
614
+ # begin
615
+ # Psych.unsafe_load("--- `", filename: "file.txt")
616
+ # rescue Psych::SyntaxError => ex
617
+ # ex.file # => 'file.txt'
618
+ # ex.message # => "(file.txt): found character that cannot start any token"
619
+ # end
620
+ #
621
+ # When the optional +symbolize_names+ keyword argument is set to a
622
+ # true value, returns symbols for keys in Hash objects (default: strings).
623
+ #
624
+ # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"}
625
+ # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
626
+ #
627
+ # Raises a TypeError when `yaml` parameter is NilClass
628
+ #
629
+ # NOTE: This method *should not* be used to parse untrusted documents, such as
630
+ # YAML documents that are supplied via user input. Instead, please use the
631
+ # load method or the safe_load method.
632
+ #
633
+ # source://psych//lib/psych.rb#272
634
+ def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
635
+
636
+ # Load the document contained in +filename+. Returns the yaml contained in
637
+ # +filename+ as a Ruby object, or if the file is empty, it returns
638
+ # the specified +fallback+ return value, which defaults to +false+.
639
+ #
640
+ # NOTE: This method *should not* be used to parse untrusted documents, such as
641
+ # YAML documents that are supplied via user input. Instead, please use the
642
+ # safe_load_file method.
643
+ #
644
+ # source://psych//lib/psych.rb#693
645
+ def unsafe_load_file(filename, **kwargs); end
646
+ end
647
+ end
648
+
649
+ # Subclasses `BadAlias` for backwards compatibility
650
+ #
651
+ # source://psych//lib/psych/exception.rb#10
652
+ class Psych::AliasesNotEnabled < ::Psych::BadAlias
653
+ # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled
654
+ #
655
+ # source://psych//lib/psych/exception.rb#11
656
+ def initialize; end
657
+ end
658
+
659
+ # Subclasses `BadAlias` for backwards compatibility
660
+ #
661
+ # source://psych//lib/psych/exception.rb#17
662
+ class Psych::AnchorNotDefined < ::Psych::BadAlias
663
+ # @return [AnchorNotDefined] a new instance of AnchorNotDefined
664
+ #
665
+ # source://psych//lib/psych/exception.rb#18
666
+ def initialize(anchor_name); end
667
+ end
668
+
669
+ # source://psych//lib/psych/class_loader.rb#6
670
+ class Psych::ClassLoader
671
+ # @return [ClassLoader] a new instance of ClassLoader
672
+ #
673
+ # source://psych//lib/psych/class_loader.rb#22
674
+ def initialize; end
675
+
676
+ # source://psych//lib/psych/class_loader.rb#40
677
+ def big_decimal; end
678
+
679
+ # source://psych//lib/psych/class_loader.rb#40
680
+ def complex; end
681
+
682
+ # source://psych//lib/psych/class_loader.rb#40
683
+ def data; end
684
+
685
+ # source://psych//lib/psych/class_loader.rb#40
686
+ def date; end
687
+
688
+ # source://psych//lib/psych/class_loader.rb#40
689
+ def date_time; end
690
+
691
+ # source://psych//lib/psych/class_loader.rb#40
692
+ def exception; end
693
+
694
+ # source://psych//lib/psych/class_loader.rb#26
695
+ def load(klassname); end
696
+
697
+ # source://psych//lib/psych/class_loader.rb#40
698
+ def object; end
699
+
700
+ # source://psych//lib/psych/class_loader.rb#40
701
+ def psych_omap; end
702
+
703
+ # source://psych//lib/psych/class_loader.rb#40
704
+ def psych_set; end
705
+
706
+ # source://psych//lib/psych/class_loader.rb#40
707
+ def range; end
708
+
709
+ # source://psych//lib/psych/class_loader.rb#40
710
+ def rational; end
711
+
712
+ # source://psych//lib/psych/class_loader.rb#40
713
+ def regexp; end
714
+
715
+ # source://psych//lib/psych/class_loader.rb#40
716
+ def struct; end
717
+
718
+ # source://psych//lib/psych/class_loader.rb#40
719
+ def symbol; end
720
+
721
+ # source://psych//lib/psych/class_loader.rb#32
722
+ def symbolize(sym); end
723
+
724
+ private
725
+
726
+ # source://psych//lib/psych/class_loader.rb#48
727
+ def find(klassname); end
728
+
729
+ # source://psych//lib/psych/class_loader.rb#52
730
+ def resolve(klassname); end
731
+ end
732
+
733
+ # source://psych//lib/psych/class_loader.rb#9
734
+ Psych::ClassLoader::DATA = T.let(T.unsafe(nil), String)
735
+
736
+ # source://psych//lib/psych/class_loader.rb#77
737
+ class Psych::ClassLoader::Restricted < ::Psych::ClassLoader
738
+ # @return [Restricted] a new instance of Restricted
739
+ #
740
+ # source://psych//lib/psych/class_loader.rb#78
741
+ def initialize(classes, symbols); end
742
+
743
+ # source://psych//lib/psych/class_loader.rb#84
744
+ def symbolize(sym); end
745
+
746
+ private
747
+
748
+ # source://psych//lib/psych/class_loader.rb#96
749
+ def find(klassname); end
750
+ end
751
+
752
+ # If an object defines +encode_with+, then an instance of Psych::Coder will
753
+ # be passed to the method when the object is being serialized. The Coder
754
+ # automatically assumes a Psych::Nodes::Mapping is being emitted. Other
755
+ # objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are
756
+ # called, respectively.
757
+ #
758
+ # source://psych//lib/psych/coder.rb#9
759
+ class Psych::Coder
760
+ # @return [Coder] a new instance of Coder
761
+ #
762
+ # source://psych//lib/psych/coder.rb#13
763
+ def initialize(tag); end
764
+
765
+ # source://psych//lib/psych/coder.rb#84
766
+ def [](k); end
767
+
768
+ # source://psych//lib/psych/coder.rb#78
769
+ def []=(k, v); end
770
+
771
+ # source://psych//lib/psych/coder.rb#78
772
+ def add(k, v); end
773
+
774
+ # Returns the value of attribute implicit.
775
+ #
776
+ # source://psych//lib/psych/coder.rb#10
777
+ def implicit; end
778
+
779
+ # Sets the attribute implicit
780
+ #
781
+ # @param value the value to set the attribute implicit to.
782
+ #
783
+ # source://psych//lib/psych/coder.rb#10
784
+ def implicit=(_arg0); end
785
+
786
+ # Emit a map. The coder will be yielded to the block.
787
+ #
788
+ # @yield [_self]
789
+ # @yieldparam _self [Psych::Coder] the object that the method was called on
790
+ #
791
+ # source://psych//lib/psych/coder.rb#34
792
+ def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end
793
+
794
+ # Emit a map with +value+
795
+ #
796
+ # source://psych//lib/psych/coder.rb#73
797
+ def map=(map); end
798
+
799
+ # Returns the value of attribute object.
800
+ #
801
+ # source://psych//lib/psych/coder.rb#10
802
+ def object; end
803
+
804
+ # Sets the attribute object
805
+ #
806
+ # @param value the value to set the attribute object to.
807
+ #
808
+ # source://psych//lib/psych/coder.rb#10
809
+ def object=(_arg0); end
810
+
811
+ # Emit a sequence with +map+ and +tag+
812
+ #
813
+ # source://psych//lib/psych/coder.rb#54
814
+ def represent_map(tag, map); end
815
+
816
+ # Emit an arbitrary object +obj+ and +tag+
817
+ #
818
+ # source://psych//lib/psych/coder.rb#60
819
+ def represent_object(tag, obj); end
820
+
821
+ # Emit a scalar with +value+ and +tag+
822
+ #
823
+ # source://psych//lib/psych/coder.rb#42
824
+ def represent_scalar(tag, value); end
825
+
826
+ # Emit a sequence with +list+ and +tag+
827
+ #
828
+ # source://psych//lib/psych/coder.rb#48
829
+ def represent_seq(tag, list); end
830
+
831
+ # source://psych//lib/psych/coder.rb#24
832
+ def scalar(*args); end
833
+
834
+ # Emit a scalar with +value+
835
+ #
836
+ # source://psych//lib/psych/coder.rb#67
837
+ def scalar=(value); end
838
+
839
+ # Returns the value of attribute seq.
840
+ #
841
+ # source://psych//lib/psych/coder.rb#11
842
+ def seq; end
843
+
844
+ # Emit a sequence of +list+
845
+ #
846
+ # source://psych//lib/psych/coder.rb#90
847
+ def seq=(list); end
848
+
849
+ # Returns the value of attribute style.
850
+ #
851
+ # source://psych//lib/psych/coder.rb#10
852
+ def style; end
853
+
854
+ # Sets the attribute style
855
+ #
856
+ # @param value the value to set the attribute style to.
857
+ #
858
+ # source://psych//lib/psych/coder.rb#10
859
+ def style=(_arg0); end
860
+
861
+ # Returns the value of attribute tag.
862
+ #
863
+ # source://psych//lib/psych/coder.rb#10
864
+ def tag; end
865
+
866
+ # Sets the attribute tag
867
+ #
868
+ # @param value the value to set the attribute tag to.
869
+ #
870
+ # source://psych//lib/psych/coder.rb#10
871
+ def tag=(_arg0); end
872
+
873
+ # Returns the value of attribute type.
874
+ #
875
+ # source://psych//lib/psych/coder.rb#11
876
+ def type; end
877
+ end
878
+
879
+ # source://psych//lib/psych/exception.rb#23
880
+ class Psych::DisallowedClass < ::Psych::Exception
881
+ # @return [DisallowedClass] a new instance of DisallowedClass
882
+ #
883
+ # source://psych//lib/psych/exception.rb#24
884
+ def initialize(action, klass_name); end
885
+ end
886
+
887
+ # Psych::Handler is an abstract base class that defines the events used
888
+ # when dealing with Psych::Parser. Clients who want to use Psych::Parser
889
+ # should implement a class that inherits from Psych::Handler and define
890
+ # events that they can handle.
891
+ #
892
+ # Psych::Handler defines all events that Psych::Parser can possibly send to
893
+ # event handlers.
894
+ #
895
+ # See Psych::Parser for more details
896
+ #
897
+ # source://psych//lib/psych/handler.rb#13
898
+ class Psych::Handler
899
+ # Called when an alias is found to +anchor+. +anchor+ will be the name
900
+ # of the anchor found.
901
+ #
902
+ # === Example
903
+ #
904
+ # Here we have an example of an array that references itself in YAML:
905
+ #
906
+ # --- &ponies
907
+ # - first element
908
+ # - *ponies
909
+ #
910
+ # &ponies is the anchor, *ponies is the alias. In this case, alias is
911
+ # called with "ponies".
912
+ #
913
+ # source://psych//lib/psych/handler.rb#110
914
+ def alias(anchor); end
915
+
916
+ # Called when an empty event happens. (Which, as far as I can tell, is
917
+ # never).
918
+ #
919
+ # source://psych//lib/psych/handler.rb#236
920
+ def empty; end
921
+
922
+ # Called with the document ends. +implicit+ is a boolean value indicating
923
+ # whether or not the document has an implicit ending.
924
+ #
925
+ # === Example
926
+ #
927
+ # Given the following YAML:
928
+ #
929
+ # ---
930
+ # hello world
931
+ #
932
+ # +implicit+ will be true. Given this YAML:
933
+ #
934
+ # ---
935
+ # hello world
936
+ # ...
937
+ #
938
+ # +implicit+ will be false.
939
+ #
940
+ # source://psych//lib/psych/handler.rb#93
941
+ def end_document(implicit); end
942
+
943
+ # Called when a map ends
944
+ #
945
+ # source://psych//lib/psych/handler.rb#230
946
+ def end_mapping; end
947
+
948
+ # Called when a sequence ends.
949
+ #
950
+ # source://psych//lib/psych/handler.rb#191
951
+ def end_sequence; end
952
+
953
+ # Called when the YAML stream ends
954
+ #
955
+ # source://psych//lib/psych/handler.rb#241
956
+ def end_stream; end
957
+
958
+ # Called before each event with line/column information.
959
+ #
960
+ # source://psych//lib/psych/handler.rb#246
961
+ def event_location(start_line, start_column, end_line, end_column); end
962
+
963
+ # Called when a scalar +value+ is found. The scalar may have an
964
+ # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+
965
+ #
966
+ # +value+ is the string value of the scalar
967
+ # +anchor+ is an associated anchor or nil
968
+ # +tag+ is an associated tag or nil
969
+ # +plain+ is a boolean value
970
+ # +quoted+ is a boolean value
971
+ # +style+ is an integer indicating the string style
972
+ #
973
+ # See the constants in Psych::Nodes::Scalar for the possible values of
974
+ # +style+
975
+ #
976
+ # === Example
977
+ #
978
+ # Here is a YAML document that exercises most of the possible ways this
979
+ # method can be called:
980
+ #
981
+ # ---
982
+ # - !str "foo"
983
+ # - &anchor fun
984
+ # - many
985
+ # lines
986
+ # - |
987
+ # many
988
+ # newlines
989
+ #
990
+ # The above YAML document contains a list with four strings. Here are
991
+ # the parameters sent to this method in the same order:
992
+ #
993
+ # # value anchor tag plain quoted style
994
+ # ["foo", nil, "!str", false, false, 3 ]
995
+ # ["fun", "anchor", nil, true, false, 1 ]
996
+ # ["many lines", nil, nil, true, false, 1 ]
997
+ # ["many\nnewlines\n", nil, nil, false, true, 4 ]
998
+ #
999
+ # source://psych//lib/psych/handler.rb#150
1000
+ def scalar(value, anchor, tag, plain, quoted, style); end
1001
+
1002
+ # Called when the document starts with the declared +version+,
1003
+ # +tag_directives+, if the document is +implicit+.
1004
+ #
1005
+ # +version+ will be an array of integers indicating the YAML version being
1006
+ # dealt with, +tag_directives+ is a list of tuples indicating the prefix
1007
+ # and suffix of each tag, and +implicit+ is a boolean indicating whether
1008
+ # the document is started implicitly.
1009
+ #
1010
+ # === Example
1011
+ #
1012
+ # Given the following YAML:
1013
+ #
1014
+ # %YAML 1.1
1015
+ # %TAG ! tag:tenderlovemaking.com,2009:
1016
+ # --- !squee
1017
+ #
1018
+ # The parameters for start_document must be this:
1019
+ #
1020
+ # version # => [1, 1]
1021
+ # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]]
1022
+ # implicit # => false
1023
+ #
1024
+ # source://psych//lib/psych/handler.rb#72
1025
+ def start_document(version, tag_directives, implicit); end
1026
+
1027
+ # Called when a map starts.
1028
+ #
1029
+ # +anchor+ is the anchor associated with the map or +nil+.
1030
+ # +tag+ is the tag associated with the map or +nil+.
1031
+ # +implicit+ is a boolean indicating whether or not the map was implicitly
1032
+ # started.
1033
+ # +style+ is an integer indicating the mapping style.
1034
+ #
1035
+ # See the constants in Psych::Nodes::Mapping for the possible values of
1036
+ # +style+.
1037
+ #
1038
+ # === Example
1039
+ #
1040
+ # Here is a YAML document that exercises most of the possible ways this
1041
+ # method can be called:
1042
+ #
1043
+ # ---
1044
+ # k: !!map { hello: world }
1045
+ # v: &pewpew
1046
+ # hello: world
1047
+ #
1048
+ # The above YAML document consists of three maps, an outer map that contains
1049
+ # two inner maps. Below is a matrix of the parameters sent in order to
1050
+ # represent these three maps:
1051
+ #
1052
+ # # anchor tag implicit style
1053
+ # [nil, nil, true, 1 ]
1054
+ # [nil, "tag:yaml.org,2002:map", false, 2 ]
1055
+ # ["pewpew", nil, true, 1 ]
1056
+ #
1057
+ # source://psych//lib/psych/handler.rb#225
1058
+ def start_mapping(anchor, tag, implicit, style); end
1059
+
1060
+ # Called when a sequence is started.
1061
+ #
1062
+ # +anchor+ is the anchor associated with the sequence or nil.
1063
+ # +tag+ is the tag associated with the sequence or nil.
1064
+ # +implicit+ a boolean indicating whether or not the sequence was implicitly
1065
+ # started.
1066
+ # +style+ is an integer indicating the list style.
1067
+ #
1068
+ # See the constants in Psych::Nodes::Sequence for the possible values of
1069
+ # +style+.
1070
+ #
1071
+ # === Example
1072
+ #
1073
+ # Here is a YAML document that exercises most of the possible ways this
1074
+ # method can be called:
1075
+ #
1076
+ # ---
1077
+ # - !!seq [
1078
+ # a
1079
+ # ]
1080
+ # - &pewpew
1081
+ # - b
1082
+ #
1083
+ # The above YAML document consists of three lists, an outer list that
1084
+ # contains two inner lists. Here is a matrix of the parameters sent
1085
+ # to represent these lists:
1086
+ #
1087
+ # # anchor tag implicit style
1088
+ # [nil, nil, true, 1 ]
1089
+ # [nil, "tag:yaml.org,2002:seq", false, 2 ]
1090
+ # ["pewpew", nil, true, 1 ]
1091
+ #
1092
+ # source://psych//lib/psych/handler.rb#186
1093
+ def start_sequence(anchor, tag, implicit, style); end
1094
+
1095
+ # Called with +encoding+ when the YAML stream starts. This method is
1096
+ # called once per stream. A stream may contain multiple documents.
1097
+ #
1098
+ # See the constants in Psych::Parser for the possible values of +encoding+.
1099
+ #
1100
+ # source://psych//lib/psych/handler.rb#47
1101
+ def start_stream(encoding); end
1102
+
1103
+ # Is this handler a streaming handler?
1104
+ #
1105
+ # @return [Boolean]
1106
+ #
1107
+ # source://psych//lib/psych/handler.rb#251
1108
+ def streaming?; end
1109
+ end
1110
+
1111
+ # Configuration options for dumping YAML.
1112
+ #
1113
+ # source://psych//lib/psych/handler.rb#16
1114
+ class Psych::Handler::DumperOptions
1115
+ # @return [DumperOptions] a new instance of DumperOptions
1116
+ #
1117
+ # source://psych//lib/psych/handler.rb#19
1118
+ def initialize; end
1119
+
1120
+ # Returns the value of attribute canonical.
1121
+ #
1122
+ # source://psych//lib/psych/handler.rb#17
1123
+ def canonical; end
1124
+
1125
+ # Sets the attribute canonical
1126
+ #
1127
+ # @param value the value to set the attribute canonical to.
1128
+ #
1129
+ # source://psych//lib/psych/handler.rb#17
1130
+ def canonical=(_arg0); end
1131
+
1132
+ # Returns the value of attribute indentation.
1133
+ #
1134
+ # source://psych//lib/psych/handler.rb#17
1135
+ def indentation; end
1136
+
1137
+ # Sets the attribute indentation
1138
+ #
1139
+ # @param value the value to set the attribute indentation to.
1140
+ #
1141
+ # source://psych//lib/psych/handler.rb#17
1142
+ def indentation=(_arg0); end
1143
+
1144
+ # Returns the value of attribute line_width.
1145
+ #
1146
+ # source://psych//lib/psych/handler.rb#17
1147
+ def line_width; end
1148
+
1149
+ # Sets the attribute line_width
1150
+ #
1151
+ # @param value the value to set the attribute line_width to.
1152
+ #
1153
+ # source://psych//lib/psych/handler.rb#17
1154
+ def line_width=(_arg0); end
1155
+ end
1156
+
1157
+ # source://psych//lib/psych/handlers/document_stream.rb#6
1158
+ class Psych::Handlers::DocumentStream < ::Psych::TreeBuilder
1159
+ # @return [DocumentStream] a new instance of DocumentStream
1160
+ #
1161
+ # source://psych//lib/psych/handlers/document_stream.rb#7
1162
+ def initialize(&block); end
1163
+
1164
+ # source://psych//lib/psych/handlers/document_stream.rb#17
1165
+ def end_document(implicit_end = T.unsafe(nil)); end
1166
+
1167
+ # source://psych//lib/psych/handlers/document_stream.rb#12
1168
+ def start_document(version, tag_directives, implicit); end
1169
+ end
1170
+
1171
+ # source://psych//lib/psych/json/ruby_events.rb#4
1172
+ module Psych::JSON::RubyEvents
1173
+ # source://psych//lib/psych/json/ruby_events.rb#10
1174
+ def visit_DateTime(o); end
1175
+
1176
+ # source://psych//lib/psych/json/ruby_events.rb#14
1177
+ def visit_String(o); end
1178
+
1179
+ # source://psych//lib/psych/json/ruby_events.rb#14
1180
+ def visit_Symbol(o); end
1181
+
1182
+ # source://psych//lib/psych/json/ruby_events.rb#5
1183
+ def visit_Time(o); end
1184
+ end
1185
+
1186
+ # source://psych//lib/psych/json/stream.rb#7
1187
+ class Psych::JSON::Stream < ::Psych::Visitors::JSONTree
1188
+ include ::Psych::Streaming
1189
+ extend ::Psych::Streaming::ClassMethods
1190
+ end
1191
+
1192
+ # source://psych//lib/psych/json/stream.rb#12
1193
+ class Psych::JSON::Stream::Emitter < ::Psych::Stream::Emitter
1194
+ include ::Psych::JSON::YAMLEvents
1195
+ end
1196
+
1197
+ # Psych::JSON::TreeBuilder is an event based AST builder. Events are sent
1198
+ # to an instance of Psych::JSON::TreeBuilder and a JSON AST is constructed.
1199
+ #
1200
+ # source://psych//lib/psych/json/tree_builder.rb#9
1201
+ class Psych::JSON::TreeBuilder < ::Psych::TreeBuilder
1202
+ include ::Psych::JSON::YAMLEvents
1203
+ end
1204
+
1205
+ # source://psych//lib/psych/json/yaml_events.rb#4
1206
+ module Psych::JSON::YAMLEvents
1207
+ # source://psych//lib/psych/json/yaml_events.rb#9
1208
+ def end_document(implicit_end = T.unsafe(nil)); end
1209
+
1210
+ # source://psych//lib/psych/json/yaml_events.rb#21
1211
+ def scalar(value, anchor, tag, plain, quoted, style); end
1212
+
1213
+ # source://psych//lib/psych/json/yaml_events.rb#5
1214
+ def start_document(version, tag_directives, implicit); end
1215
+
1216
+ # source://psych//lib/psych/json/yaml_events.rb#13
1217
+ def start_mapping(anchor, tag, implicit, style); end
1218
+
1219
+ # source://psych//lib/psych/json/yaml_events.rb#17
1220
+ def start_sequence(anchor, tag, implicit, style); end
1221
+ end
1222
+
1223
+ # This class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias].
1224
+ # It points to an +anchor+.
1225
+ #
1226
+ # A Psych::Nodes::Alias is a terminal node and may have no children.
1227
+ #
1228
+ # source://psych//lib/psych/nodes/alias.rb#9
1229
+ class Psych::Nodes::Alias < ::Psych::Nodes::Node
1230
+ # Create a new Alias that points to an +anchor+
1231
+ #
1232
+ # @return [Alias] a new instance of Alias
1233
+ #
1234
+ # source://psych//lib/psych/nodes/alias.rb#14
1235
+ def initialize(anchor); end
1236
+
1237
+ # @return [Boolean]
1238
+ #
1239
+ # source://psych//lib/psych/nodes/alias.rb#18
1240
+ def alias?; end
1241
+
1242
+ # The anchor this alias links to
1243
+ #
1244
+ # source://psych//lib/psych/nodes/alias.rb#11
1245
+ def anchor; end
1246
+
1247
+ # The anchor this alias links to
1248
+ #
1249
+ # source://psych//lib/psych/nodes/alias.rb#11
1250
+ def anchor=(_arg0); end
1251
+ end
1252
+
1253
+ # This represents a YAML Document. This node must be a child of
1254
+ # Psych::Nodes::Stream. A Psych::Nodes::Document must have one child,
1255
+ # and that child may be one of the following:
1256
+ #
1257
+ # * Psych::Nodes::Sequence
1258
+ # * Psych::Nodes::Mapping
1259
+ # * Psych::Nodes::Scalar
1260
+ #
1261
+ # source://psych//lib/psych/nodes/document.rb#12
1262
+ class Psych::Nodes::Document < ::Psych::Nodes::Node
1263
+ # Create a new Psych::Nodes::Document object.
1264
+ #
1265
+ # +version+ is a list indicating the YAML version.
1266
+ # +tags_directives+ is a list of tag directive declarations
1267
+ # +implicit+ is a flag indicating whether the document will be implicitly
1268
+ # started.
1269
+ #
1270
+ # == Example:
1271
+ # This creates a YAML document object that represents a YAML 1.1 document
1272
+ # with one tag directive, and has an implicit start:
1273
+ #
1274
+ # Psych::Nodes::Document.new(
1275
+ # [1,1],
1276
+ # [["!", "tag:tenderlovemaking.com,2009:"]],
1277
+ # true
1278
+ # )
1279
+ #
1280
+ # == See Also
1281
+ # See also Psych::Handler#start_document
1282
+ #
1283
+ # @return [Document] a new instance of Document
1284
+ #
1285
+ # source://psych//lib/psych/nodes/document.rb#45
1286
+ def initialize(version = T.unsafe(nil), tag_directives = T.unsafe(nil), implicit = T.unsafe(nil)); end
1287
+
1288
+ # @return [Boolean]
1289
+ #
1290
+ # source://psych//lib/psych/nodes/document.rb#60
1291
+ def document?; end
1292
+
1293
+ # Was this document implicitly created?
1294
+ #
1295
+ # source://psych//lib/psych/nodes/document.rb#20
1296
+ def implicit; end
1297
+
1298
+ # Was this document implicitly created?
1299
+ #
1300
+ # source://psych//lib/psych/nodes/document.rb#20
1301
+ def implicit=(_arg0); end
1302
+
1303
+ # Is the end of the document implicit?
1304
+ #
1305
+ # source://psych//lib/psych/nodes/document.rb#23
1306
+ def implicit_end; end
1307
+
1308
+ # Is the end of the document implicit?
1309
+ #
1310
+ # source://psych//lib/psych/nodes/document.rb#23
1311
+ def implicit_end=(_arg0); end
1312
+
1313
+ # Returns the root node. A Document may only have one root node:
1314
+ # http://yaml.org/spec/1.1/#id898031
1315
+ #
1316
+ # source://psych//lib/psych/nodes/document.rb#56
1317
+ def root; end
1318
+
1319
+ # A list of tag directives for this document
1320
+ #
1321
+ # source://psych//lib/psych/nodes/document.rb#17
1322
+ def tag_directives; end
1323
+
1324
+ # A list of tag directives for this document
1325
+ #
1326
+ # source://psych//lib/psych/nodes/document.rb#17
1327
+ def tag_directives=(_arg0); end
1328
+
1329
+ # The version of the YAML document
1330
+ #
1331
+ # source://psych//lib/psych/nodes/document.rb#14
1332
+ def version; end
1333
+
1334
+ # The version of the YAML document
1335
+ #
1336
+ # source://psych//lib/psych/nodes/document.rb#14
1337
+ def version=(_arg0); end
1338
+ end
1339
+
1340
+ # This class represents a {YAML Mapping}[http://yaml.org/spec/1.1/#mapping].
1341
+ #
1342
+ # A Psych::Nodes::Mapping node may have 0 or more children, but must have
1343
+ # an even number of children. Here are the valid children a
1344
+ # Psych::Nodes::Mapping node may have:
1345
+ #
1346
+ # * Psych::Nodes::Sequence
1347
+ # * Psych::Nodes::Mapping
1348
+ # * Psych::Nodes::Scalar
1349
+ # * Psych::Nodes::Alias
1350
+ #
1351
+ # source://psych//lib/psych/nodes/mapping.rb#15
1352
+ class Psych::Nodes::Mapping < ::Psych::Nodes::Node
1353
+ # Create a new Psych::Nodes::Mapping object.
1354
+ #
1355
+ # +anchor+ is the anchor associated with the map or +nil+.
1356
+ # +tag+ is the tag associated with the map or +nil+.
1357
+ # +implicit+ is a boolean indicating whether or not the map was implicitly
1358
+ # started.
1359
+ # +style+ is an integer indicating the mapping style.
1360
+ #
1361
+ # == See Also
1362
+ # See also Psych::Handler#start_mapping
1363
+ #
1364
+ # @return [Mapping] a new instance of Mapping
1365
+ #
1366
+ # source://psych//lib/psych/nodes/mapping.rb#48
1367
+ def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end
1368
+
1369
+ # The optional anchor for this mapping
1370
+ #
1371
+ # source://psych//lib/psych/nodes/mapping.rb#26
1372
+ def anchor; end
1373
+
1374
+ # The optional anchor for this mapping
1375
+ #
1376
+ # source://psych//lib/psych/nodes/mapping.rb#26
1377
+ def anchor=(_arg0); end
1378
+
1379
+ # Is this an implicit mapping?
1380
+ #
1381
+ # source://psych//lib/psych/nodes/mapping.rb#32
1382
+ def implicit; end
1383
+
1384
+ # Is this an implicit mapping?
1385
+ #
1386
+ # source://psych//lib/psych/nodes/mapping.rb#32
1387
+ def implicit=(_arg0); end
1388
+
1389
+ # @return [Boolean]
1390
+ #
1391
+ # source://psych//lib/psych/nodes/mapping.rb#56
1392
+ def mapping?; end
1393
+
1394
+ # The style of this mapping
1395
+ #
1396
+ # source://psych//lib/psych/nodes/mapping.rb#35
1397
+ def style; end
1398
+
1399
+ # The style of this mapping
1400
+ #
1401
+ # source://psych//lib/psych/nodes/mapping.rb#35
1402
+ def style=(_arg0); end
1403
+
1404
+ # The optional tag for this mapping
1405
+ #
1406
+ # source://psych//lib/psych/nodes/mapping.rb#29
1407
+ def tag; end
1408
+
1409
+ # The optional tag for this mapping
1410
+ #
1411
+ # source://psych//lib/psych/nodes/mapping.rb#29
1412
+ def tag=(_arg0); end
1413
+ end
1414
+
1415
+ # The base class for any Node in a YAML parse tree. This class should
1416
+ # never be instantiated.
1417
+ #
1418
+ # source://psych//lib/psych/nodes/node.rb#10
1419
+ class Psych::Nodes::Node
1420
+ include ::Enumerable
1421
+
1422
+ # Create a new Psych::Nodes::Node
1423
+ #
1424
+ # @return [Node] a new instance of Node
1425
+ #
1426
+ # source://psych//lib/psych/nodes/node.rb#32
1427
+ def initialize; end
1428
+
1429
+ # @return [Boolean]
1430
+ #
1431
+ # source://psych//lib/psych/nodes/node.rb#68
1432
+ def alias?; end
1433
+
1434
+ # The children of this node
1435
+ #
1436
+ # source://psych//lib/psych/nodes/node.rb#14
1437
+ def children; end
1438
+
1439
+ # @return [Boolean]
1440
+ #
1441
+ # source://psych//lib/psych/nodes/node.rb#69
1442
+ def document?; end
1443
+
1444
+ # Iterate over each node in the tree. Yields each node to +block+ depth
1445
+ # first.
1446
+ #
1447
+ # source://psych//lib/psych/nodes/node.rb#39
1448
+ def each(&block); end
1449
+
1450
+ # The column number where this node ends
1451
+ #
1452
+ # source://psych//lib/psych/nodes/node.rb#29
1453
+ def end_column; end
1454
+
1455
+ # The column number where this node ends
1456
+ #
1457
+ # source://psych//lib/psych/nodes/node.rb#29
1458
+ def end_column=(_arg0); end
1459
+
1460
+ # The line number where this node ends
1461
+ #
1462
+ # source://psych//lib/psych/nodes/node.rb#26
1463
+ def end_line; end
1464
+
1465
+ # The line number where this node ends
1466
+ #
1467
+ # source://psych//lib/psych/nodes/node.rb#26
1468
+ def end_line=(_arg0); end
1469
+
1470
+ # @return [Boolean]
1471
+ #
1472
+ # source://psych//lib/psych/nodes/node.rb#70
1473
+ def mapping?; end
1474
+
1475
+ # @return [Boolean]
1476
+ #
1477
+ # source://psych//lib/psych/nodes/node.rb#71
1478
+ def scalar?; end
1479
+
1480
+ # @return [Boolean]
1481
+ #
1482
+ # source://psych//lib/psych/nodes/node.rb#72
1483
+ def sequence?; end
1484
+
1485
+ # The column number where this node start
1486
+ #
1487
+ # source://psych//lib/psych/nodes/node.rb#23
1488
+ def start_column; end
1489
+
1490
+ # The column number where this node start
1491
+ #
1492
+ # source://psych//lib/psych/nodes/node.rb#23
1493
+ def start_column=(_arg0); end
1494
+
1495
+ # The line number where this node start
1496
+ #
1497
+ # source://psych//lib/psych/nodes/node.rb#20
1498
+ def start_line; end
1499
+
1500
+ # The line number where this node start
1501
+ #
1502
+ # source://psych//lib/psych/nodes/node.rb#20
1503
+ def start_line=(_arg0); end
1504
+
1505
+ # @return [Boolean]
1506
+ #
1507
+ # source://psych//lib/psych/nodes/node.rb#73
1508
+ def stream?; end
1509
+
1510
+ # An associated tag
1511
+ #
1512
+ # source://psych//lib/psych/nodes/node.rb#17
1513
+ def tag; end
1514
+
1515
+ # Convert this node to Ruby.
1516
+ #
1517
+ # See also Psych::Visitors::ToRuby
1518
+ #
1519
+ # source://psych//lib/psych/nodes/node.rb#48
1520
+ def to_ruby(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
1521
+
1522
+ # Convert this node to YAML.
1523
+ #
1524
+ # See also Psych::Visitors::Emitter
1525
+ #
1526
+ # source://psych//lib/psych/nodes/node.rb#57
1527
+ def to_yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end
1528
+
1529
+ # Convert this node to Ruby.
1530
+ #
1531
+ # See also Psych::Visitors::ToRuby
1532
+ #
1533
+ # source://psych//lib/psych/nodes/node.rb#48
1534
+ def transform(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
1535
+
1536
+ # Convert this node to YAML.
1537
+ #
1538
+ # See also Psych::Visitors::Emitter
1539
+ #
1540
+ # source://psych//lib/psych/nodes/node.rb#57
1541
+ def yaml(io = T.unsafe(nil), options = T.unsafe(nil)); end
1542
+ end
1543
+
1544
+ # This class represents a {YAML Scalar}[http://yaml.org/spec/1.1/#id858081].
1545
+ #
1546
+ # This node type is a terminal node and should not have any children.
1547
+ #
1548
+ # source://psych//lib/psych/nodes/scalar.rb#8
1549
+ class Psych::Nodes::Scalar < ::Psych::Nodes::Node
1550
+ # Create a new Psych::Nodes::Scalar object.
1551
+ #
1552
+ # +value+ is the string value of the scalar
1553
+ # +anchor+ is an associated anchor or nil
1554
+ # +tag+ is an associated tag or nil
1555
+ # +plain+ is a boolean value
1556
+ # +quoted+ is a boolean value
1557
+ # +style+ is an integer indicating the string style
1558
+ #
1559
+ # == See Also
1560
+ #
1561
+ # See also Psych::Handler#scalar
1562
+ #
1563
+ # @return [Scalar] a new instance of Scalar
1564
+ #
1565
+ # source://psych//lib/psych/nodes/scalar.rb#58
1566
+ def initialize(value, anchor = T.unsafe(nil), tag = T.unsafe(nil), plain = T.unsafe(nil), quoted = T.unsafe(nil), style = T.unsafe(nil)); end
1567
+
1568
+ # The anchor value (if there is one)
1569
+ #
1570
+ # source://psych//lib/psych/nodes/scalar.rb#31
1571
+ def anchor; end
1572
+
1573
+ # The anchor value (if there is one)
1574
+ #
1575
+ # source://psych//lib/psych/nodes/scalar.rb#31
1576
+ def anchor=(_arg0); end
1577
+
1578
+ # Is this a plain scalar?
1579
+ #
1580
+ # source://psych//lib/psych/nodes/scalar.rb#37
1581
+ def plain; end
1582
+
1583
+ # Is this a plain scalar?
1584
+ #
1585
+ # source://psych//lib/psych/nodes/scalar.rb#37
1586
+ def plain=(_arg0); end
1587
+
1588
+ # Is this scalar quoted?
1589
+ #
1590
+ # source://psych//lib/psych/nodes/scalar.rb#40
1591
+ def quoted; end
1592
+
1593
+ # Is this scalar quoted?
1594
+ #
1595
+ # source://psych//lib/psych/nodes/scalar.rb#40
1596
+ def quoted=(_arg0); end
1597
+
1598
+ # @return [Boolean]
1599
+ #
1600
+ # source://psych//lib/psych/nodes/scalar.rb#67
1601
+ def scalar?; end
1602
+
1603
+ # The style of this scalar
1604
+ #
1605
+ # source://psych//lib/psych/nodes/scalar.rb#43
1606
+ def style; end
1607
+
1608
+ # The style of this scalar
1609
+ #
1610
+ # source://psych//lib/psych/nodes/scalar.rb#43
1611
+ def style=(_arg0); end
1612
+
1613
+ # The tag value (if there is one)
1614
+ #
1615
+ # source://psych//lib/psych/nodes/scalar.rb#34
1616
+ def tag; end
1617
+
1618
+ # The tag value (if there is one)
1619
+ #
1620
+ # source://psych//lib/psych/nodes/scalar.rb#34
1621
+ def tag=(_arg0); end
1622
+
1623
+ # The scalar value
1624
+ #
1625
+ # source://psych//lib/psych/nodes/scalar.rb#28
1626
+ def value; end
1627
+
1628
+ # The scalar value
1629
+ #
1630
+ # source://psych//lib/psych/nodes/scalar.rb#28
1631
+ def value=(_arg0); end
1632
+ end
1633
+
1634
+ # This class represents a
1635
+ # {YAML sequence}[http://yaml.org/spec/1.1/#sequence/syntax].
1636
+ #
1637
+ # A YAML sequence is basically a list, and looks like this:
1638
+ #
1639
+ # %YAML 1.1
1640
+ # ---
1641
+ # - I am
1642
+ # - a Sequence
1643
+ #
1644
+ # A YAML sequence may have an anchor like this:
1645
+ #
1646
+ # %YAML 1.1
1647
+ # ---
1648
+ # &A [
1649
+ # "This sequence",
1650
+ # "has an anchor"
1651
+ # ]
1652
+ #
1653
+ # A YAML sequence may also have a tag like this:
1654
+ #
1655
+ # %YAML 1.1
1656
+ # ---
1657
+ # !!seq [
1658
+ # "This sequence",
1659
+ # "has a tag"
1660
+ # ]
1661
+ #
1662
+ # This class represents a sequence in a YAML document. A
1663
+ # Psych::Nodes::Sequence node may have 0 or more children. Valid children
1664
+ # for this node are:
1665
+ #
1666
+ # * Psych::Nodes::Sequence
1667
+ # * Psych::Nodes::Mapping
1668
+ # * Psych::Nodes::Scalar
1669
+ # * Psych::Nodes::Alias
1670
+ #
1671
+ # source://psych//lib/psych/nodes/sequence.rb#41
1672
+ class Psych::Nodes::Sequence < ::Psych::Nodes::Node
1673
+ # Create a new object representing a YAML sequence.
1674
+ #
1675
+ # +anchor+ is the anchor associated with the sequence or nil.
1676
+ # +tag+ is the tag associated with the sequence or nil.
1677
+ # +implicit+ a boolean indicating whether or not the sequence was
1678
+ # implicitly started.
1679
+ # +style+ is an integer indicating the list style.
1680
+ #
1681
+ # See Psych::Handler#start_sequence
1682
+ #
1683
+ # @return [Sequence] a new instance of Sequence
1684
+ #
1685
+ # source://psych//lib/psych/nodes/sequence.rb#73
1686
+ def initialize(anchor = T.unsafe(nil), tag = T.unsafe(nil), implicit = T.unsafe(nil), style = T.unsafe(nil)); end
1687
+
1688
+ # The anchor for this sequence (if any)
1689
+ #
1690
+ # source://psych//lib/psych/nodes/sequence.rb#52
1691
+ def anchor; end
1692
+
1693
+ # The anchor for this sequence (if any)
1694
+ #
1695
+ # source://psych//lib/psych/nodes/sequence.rb#52
1696
+ def anchor=(_arg0); end
1697
+
1698
+ # Is this sequence started implicitly?
1699
+ #
1700
+ # source://psych//lib/psych/nodes/sequence.rb#58
1701
+ def implicit; end
1702
+
1703
+ # Is this sequence started implicitly?
1704
+ #
1705
+ # source://psych//lib/psych/nodes/sequence.rb#58
1706
+ def implicit=(_arg0); end
1707
+
1708
+ # @return [Boolean]
1709
+ #
1710
+ # source://psych//lib/psych/nodes/sequence.rb#81
1711
+ def sequence?; end
1712
+
1713
+ # The sequence style used
1714
+ #
1715
+ # source://psych//lib/psych/nodes/sequence.rb#61
1716
+ def style; end
1717
+
1718
+ # The sequence style used
1719
+ #
1720
+ # source://psych//lib/psych/nodes/sequence.rb#61
1721
+ def style=(_arg0); end
1722
+
1723
+ # The tag name for this sequence (if any)
1724
+ #
1725
+ # source://psych//lib/psych/nodes/sequence.rb#55
1726
+ def tag; end
1727
+
1728
+ # The tag name for this sequence (if any)
1729
+ #
1730
+ # source://psych//lib/psych/nodes/sequence.rb#55
1731
+ def tag=(_arg0); end
1732
+ end
1733
+
1734
+ # Represents a YAML stream. This is the root node for any YAML parse
1735
+ # tree. This node must have one or more child nodes. The only valid
1736
+ # child node for a Psych::Nodes::Stream node is Psych::Nodes::Document.
1737
+ #
1738
+ # source://psych//lib/psych/nodes/stream.rb#8
1739
+ class Psych::Nodes::Stream < ::Psych::Nodes::Node
1740
+ # Create a new Psych::Nodes::Stream node with an +encoding+ that
1741
+ # defaults to Psych::Nodes::Stream::UTF8.
1742
+ #
1743
+ # See also Psych::Handler#start_stream
1744
+ #
1745
+ # @return [Stream] a new instance of Stream
1746
+ #
1747
+ # source://psych//lib/psych/nodes/stream.rb#32
1748
+ def initialize(encoding = T.unsafe(nil)); end
1749
+
1750
+ # The encoding used for this stream
1751
+ #
1752
+ # source://psych//lib/psych/nodes/stream.rb#25
1753
+ def encoding; end
1754
+
1755
+ # The encoding used for this stream
1756
+ #
1757
+ # source://psych//lib/psych/nodes/stream.rb#25
1758
+ def encoding=(_arg0); end
1759
+
1760
+ # @return [Boolean]
1761
+ #
1762
+ # source://psych//lib/psych/nodes/stream.rb#37
1763
+ def stream?; end
1764
+ end
1765
+
1766
+ # YAML event parser class. This class parses a YAML document and calls
1767
+ # events on the handler that is passed to the constructor. The events can
1768
+ # be used for things such as constructing a YAML AST or deserializing YAML
1769
+ # documents. It can even be fed back to Psych::Emitter to emit the same
1770
+ # document that was parsed.
1771
+ #
1772
+ # See Psych::Handler for documentation on the events that Psych::Parser emits.
1773
+ #
1774
+ # Here is an example that prints out ever scalar found in a YAML document:
1775
+ #
1776
+ # # Handler for detecting scalar values
1777
+ # class ScalarHandler < Psych::Handler
1778
+ # def scalar value, anchor, tag, plain, quoted, style
1779
+ # puts value
1780
+ # end
1781
+ # end
1782
+ #
1783
+ # parser = Psych::Parser.new(ScalarHandler.new)
1784
+ # parser.parse(yaml_document)
1785
+ #
1786
+ # Here is an example that feeds the parser back in to Psych::Emitter. The
1787
+ # YAML document is read from STDIN and written back out to STDERR:
1788
+ #
1789
+ # parser = Psych::Parser.new(Psych::Emitter.new($stderr))
1790
+ # parser.parse($stdin)
1791
+ #
1792
+ # Psych uses Psych::Parser in combination with Psych::TreeBuilder to
1793
+ # construct an AST of the parsed YAML document.
1794
+ #
1795
+ # source://psych//lib/psych/parser.rb#33
1796
+ class Psych::Parser
1797
+ # Creates a new Psych::Parser instance with +handler+. YAML events will
1798
+ # be called on +handler+. See Psych::Parser for more details.
1799
+ #
1800
+ # @return [Parser] a new instance of Parser
1801
+ #
1802
+ # source://psych//lib/psych/parser.rb#47
1803
+ def initialize(handler = T.unsafe(nil)); end
1804
+
1805
+ # Set the encoding for this parser to +encoding+
1806
+ #
1807
+ # source://psych//lib/psych/parser.rb#41
1808
+ def external_encoding=(_arg0); end
1809
+
1810
+ # The handler on which events will be called
1811
+ #
1812
+ # source://psych//lib/psych/parser.rb#38
1813
+ def handler; end
1814
+
1815
+ # The handler on which events will be called
1816
+ #
1817
+ # source://psych//lib/psych/parser.rb#38
1818
+ def handler=(_arg0); end
1819
+
1820
+ # call-seq:
1821
+ # parser.parse(yaml)
1822
+ #
1823
+ # Parse the YAML document contained in +yaml+. Events will be called on
1824
+ # the handler set on the parser instance.
1825
+ #
1826
+ # See Psych::Parser and Psych::Parser#handler
1827
+ #
1828
+ # source://psych//lib/psych/parser.rb#61
1829
+ def parse(yaml, path = T.unsafe(nil)); end
1830
+ end
1831
+
1832
+ # Scan scalars for built in types
1833
+ #
1834
+ # source://psych//lib/psych/scalar_scanner.rb#6
1835
+ class Psych::ScalarScanner
1836
+ # Create a new scanner
1837
+ #
1838
+ # @return [ScalarScanner] a new instance of ScalarScanner
1839
+ #
1840
+ # source://psych//lib/psych/scalar_scanner.rb#30
1841
+ def initialize(class_loader, strict_integer: T.unsafe(nil)); end
1842
+
1843
+ # Returns the value of attribute class_loader.
1844
+ #
1845
+ # source://psych//lib/psych/scalar_scanner.rb#27
1846
+ def class_loader; end
1847
+
1848
+ # Parse and return an int from +string+
1849
+ #
1850
+ # source://psych//lib/psych/scalar_scanner.rb#108
1851
+ def parse_int(string); end
1852
+
1853
+ # Parse and return a Time from +string+
1854
+ #
1855
+ # source://psych//lib/psych/scalar_scanner.rb#114
1856
+ def parse_time(string); end
1857
+
1858
+ # Tokenize +string+ returning the Ruby object
1859
+ #
1860
+ # source://psych//lib/psych/scalar_scanner.rb#37
1861
+ def tokenize(string); end
1862
+ end
1863
+
1864
+ # Same as above, but allows commas.
1865
+ # Not to YML spec, but kept for backwards compatibility
1866
+ #
1867
+ # source://psych//lib/psych/scalar_scanner.rb#22
1868
+ Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp)
1869
+
1870
+ # Taken from http://yaml.org/type/int.html and modified to ensure at least one numerical symbol exists
1871
+ #
1872
+ # source://psych//lib/psych/scalar_scanner.rb#15
1873
+ Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp)
1874
+
1875
+ # Psych::Stream is a streaming YAML emitter. It will not buffer your YAML,
1876
+ # but send it straight to an IO.
1877
+ #
1878
+ # Here is an example use:
1879
+ #
1880
+ # stream = Psych::Stream.new($stdout)
1881
+ # stream.start
1882
+ # stream.push({:foo => 'bar'})
1883
+ # stream.finish
1884
+ #
1885
+ # YAML will be immediately emitted to $stdout with no buffering.
1886
+ #
1887
+ # Psych::Stream#start will take a block and ensure that Psych::Stream#finish
1888
+ # is called, so you can do this form:
1889
+ #
1890
+ # stream = Psych::Stream.new($stdout)
1891
+ # stream.start do |em|
1892
+ # em.push(:foo => 'bar')
1893
+ # end
1894
+ #
1895
+ # source://psych//lib/psych/stream.rb#24
1896
+ class Psych::Stream < ::Psych::Visitors::YAMLTree
1897
+ include ::Psych::Streaming
1898
+ extend ::Psych::Streaming::ClassMethods
1899
+ end
1900
+
1901
+ # source://psych//lib/psych/stream.rb#25
1902
+ class Psych::Stream::Emitter < ::Psych::Emitter
1903
+ # source://psych//lib/psych/stream.rb#26
1904
+ def end_document(implicit_end = T.unsafe(nil)); end
1905
+
1906
+ # @return [Boolean]
1907
+ #
1908
+ # source://psych//lib/psych/stream.rb#30
1909
+ def streaming?; end
1910
+ end
1911
+
1912
+ # source://psych//lib/psych/streaming.rb#3
1913
+ module Psych::Streaming
1914
+ # Start streaming using +encoding+
1915
+ #
1916
+ # source://psych//lib/psych/streaming.rb#18
1917
+ def start(encoding = T.unsafe(nil)); end
1918
+
1919
+ private
1920
+
1921
+ # source://psych//lib/psych/streaming.rb#25
1922
+ def register(target, obj); end
1923
+ end
1924
+
1925
+ # source://psych//lib/psych/streaming.rb#4
1926
+ module Psych::Streaming::ClassMethods
1927
+ # Create a new streaming emitter. Emitter will print to +io+. See
1928
+ # Psych::Stream for an example.
1929
+ #
1930
+ # source://psych//lib/psych/streaming.rb#8
1931
+ def new(io); end
1932
+ end
1933
+
1934
+ # source://psych//lib/psych/syntax_error.rb#5
1935
+ class Psych::SyntaxError < ::Psych::Exception
1936
+ # @return [SyntaxError] a new instance of SyntaxError
1937
+ #
1938
+ # source://psych//lib/psych/syntax_error.rb#8
1939
+ def initialize(file, line, col, offset, problem, context); end
1940
+
1941
+ # Returns the value of attribute column.
1942
+ #
1943
+ # source://psych//lib/psych/syntax_error.rb#6
1944
+ def column; end
1945
+
1946
+ # Returns the value of attribute context.
1947
+ #
1948
+ # source://psych//lib/psych/syntax_error.rb#6
1949
+ def context; end
1950
+
1951
+ # Returns the value of attribute file.
1952
+ #
1953
+ # source://psych//lib/psych/syntax_error.rb#6
1954
+ def file; end
1955
+
1956
+ # Returns the value of attribute line.
1957
+ #
1958
+ # source://psych//lib/psych/syntax_error.rb#6
1959
+ def line; end
1960
+
1961
+ # Returns the value of attribute offset.
1962
+ #
1963
+ # source://psych//lib/psych/syntax_error.rb#6
1964
+ def offset; end
1965
+
1966
+ # Returns the value of attribute problem.
1967
+ #
1968
+ # source://psych//lib/psych/syntax_error.rb#6
1969
+ def problem; end
1970
+ end
1971
+
1972
+ # This class works in conjunction with Psych::Parser to build an in-memory
1973
+ # parse tree that represents a YAML document.
1974
+ #
1975
+ # == Example
1976
+ #
1977
+ # parser = Psych::Parser.new Psych::TreeBuilder.new
1978
+ # parser.parse('--- foo')
1979
+ # tree = parser.handler.root
1980
+ #
1981
+ # See Psych::Handler for documentation on the event methods used in this
1982
+ # class.
1983
+ #
1984
+ # source://psych//lib/psych/tree_builder.rb#17
1985
+ class Psych::TreeBuilder < ::Psych::Handler
1986
+ # Create a new TreeBuilder instance
1987
+ #
1988
+ # @return [TreeBuilder] a new instance of TreeBuilder
1989
+ #
1990
+ # source://psych//lib/psych/tree_builder.rb#22
1991
+ def initialize; end
1992
+
1993
+ # source://psych//lib/psych/tree_builder.rb#103
1994
+ def alias(anchor); end
1995
+
1996
+ # Handles end_document events with +version+, +tag_directives+,
1997
+ # and +implicit+ styling.
1998
+ #
1999
+ # See Psych::Handler#start_document
2000
+ #
2001
+ # source://psych//lib/psych/tree_builder.rb#77
2002
+ def end_document(implicit_end = T.unsafe(nil)); end
2003
+
2004
+ # source://psych//lib/psych/tree_builder.rb#52
2005
+ def end_mapping; end
2006
+
2007
+ # source://psych//lib/psych/tree_builder.rb#52
2008
+ def end_sequence; end
2009
+
2010
+ # source://psych//lib/psych/tree_builder.rb#90
2011
+ def end_stream; end
2012
+
2013
+ # source://psych//lib/psych/tree_builder.rb#33
2014
+ def event_location(start_line, start_column, end_line, end_column); end
2015
+
2016
+ # Returns the root node for the built tree
2017
+ #
2018
+ # source://psych//lib/psych/tree_builder.rb#19
2019
+ def root; end
2020
+
2021
+ # source://psych//lib/psych/tree_builder.rb#96
2022
+ def scalar(value, anchor, tag, plain, quoted, style); end
2023
+
2024
+ # Handles start_document events with +version+, +tag_directives+,
2025
+ # and +implicit+ styling.
2026
+ #
2027
+ # See Psych::Handler#start_document
2028
+ #
2029
+ # source://psych//lib/psych/tree_builder.rb#65
2030
+ def start_document(version, tag_directives, implicit); end
2031
+
2032
+ # source://psych//lib/psych/tree_builder.rb#45
2033
+ def start_mapping(anchor, tag, implicit, style); end
2034
+
2035
+ # source://psych//lib/psych/tree_builder.rb#45
2036
+ def start_sequence(anchor, tag, implicit, style); end
2037
+
2038
+ # source://psych//lib/psych/tree_builder.rb#84
2039
+ def start_stream(encoding); end
2040
+
2041
+ private
2042
+
2043
+ # source://psych//lib/psych/tree_builder.rb#116
2044
+ def pop; end
2045
+
2046
+ # source://psych//lib/psych/tree_builder.rb#111
2047
+ def push(value); end
2048
+
2049
+ # source://psych//lib/psych/tree_builder.rb#132
2050
+ def set_end_location(node); end
2051
+
2052
+ # source://psych//lib/psych/tree_builder.rb#122
2053
+ def set_location(node); end
2054
+
2055
+ # source://psych//lib/psych/tree_builder.rb#127
2056
+ def set_start_location(node); end
2057
+ end
2058
+
2059
+ # The version of Psych you are using
2060
+ #
2061
+ # source://psych//lib/psych/versions.rb#5
2062
+ Psych::VERSION = T.let(T.unsafe(nil), String)
2063
+
2064
+ # source://psych//lib/psych/visitors/depth_first.rb#4
2065
+ class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor
2066
+ # @return [DepthFirst] a new instance of DepthFirst
2067
+ #
2068
+ # source://psych//lib/psych/visitors/depth_first.rb#5
2069
+ def initialize(block); end
2070
+
2071
+ private
2072
+
2073
+ # source://psych//lib/psych/visitors/depth_first.rb#11
2074
+ def nary(o); end
2075
+
2076
+ # source://psych//lib/psych/visitors/depth_first.rb#20
2077
+ def terminal(o); end
2078
+
2079
+ # source://psych//lib/psych/visitors/depth_first.rb#20
2080
+ def visit_Psych_Nodes_Alias(o); end
2081
+
2082
+ # source://psych//lib/psych/visitors/depth_first.rb#11
2083
+ def visit_Psych_Nodes_Document(o); end
2084
+
2085
+ # source://psych//lib/psych/visitors/depth_first.rb#11
2086
+ def visit_Psych_Nodes_Mapping(o); end
2087
+
2088
+ # source://psych//lib/psych/visitors/depth_first.rb#20
2089
+ def visit_Psych_Nodes_Scalar(o); end
2090
+
2091
+ # source://psych//lib/psych/visitors/depth_first.rb#11
2092
+ def visit_Psych_Nodes_Sequence(o); end
2093
+
2094
+ # source://psych//lib/psych/visitors/depth_first.rb#11
2095
+ def visit_Psych_Nodes_Stream(o); end
2096
+ end
2097
+
2098
+ # source://psych//lib/psych/visitors/emitter.rb#4
2099
+ class Psych::Visitors::Emitter < ::Psych::Visitors::Visitor
2100
+ # @return [Emitter] a new instance of Emitter
2101
+ #
2102
+ # source://psych//lib/psych/visitors/emitter.rb#5
2103
+ def initialize(io, options = T.unsafe(nil)); end
2104
+
2105
+ # source://psych//lib/psych/visitors/emitter.rb#47
2106
+ def visit_Psych_Nodes_Alias(o); end
2107
+
2108
+ # source://psych//lib/psych/visitors/emitter.rb#25
2109
+ def visit_Psych_Nodes_Document(o); end
2110
+
2111
+ # source://psych//lib/psych/visitors/emitter.rb#41
2112
+ def visit_Psych_Nodes_Mapping(o); end
2113
+
2114
+ # source://psych//lib/psych/visitors/emitter.rb#31
2115
+ def visit_Psych_Nodes_Scalar(o); end
2116
+
2117
+ # source://psych//lib/psych/visitors/emitter.rb#35
2118
+ def visit_Psych_Nodes_Sequence(o); end
2119
+
2120
+ # source://psych//lib/psych/visitors/emitter.rb#19
2121
+ def visit_Psych_Nodes_Stream(o); end
2122
+ end
2123
+
2124
+ # source://psych//lib/psych/visitors/json_tree.rb#6
2125
+ class Psych::Visitors::JSONTree < ::Psych::Visitors::YAMLTree
2126
+ include ::Psych::JSON::RubyEvents
2127
+
2128
+ # source://psych//lib/psych/visitors/json_tree.rb#16
2129
+ def accept(target); end
2130
+
2131
+ class << self
2132
+ # source://psych//lib/psych/visitors/json_tree.rb#9
2133
+ def create(options = T.unsafe(nil)); end
2134
+ end
2135
+ end
2136
+
2137
+ # source://psych//lib/psych/visitors/to_ruby.rb#469
2138
+ class Psych::Visitors::NoAliasRuby < ::Psych::Visitors::ToRuby
2139
+ # @raise [AliasesNotEnabled]
2140
+ #
2141
+ # source://psych//lib/psych/visitors/to_ruby.rb#470
2142
+ def visit_Psych_Nodes_Alias(o); end
2143
+ end
2144
+
2145
+ # source://psych//lib/psych/visitors/yaml_tree.rb#580
2146
+ class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree
2147
+ # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree
2148
+ #
2149
+ # source://psych//lib/psych/visitors/yaml_tree.rb#592
2150
+ def initialize(emitter, ss, options); end
2151
+
2152
+ # source://psych//lib/psych/visitors/yaml_tree.rb#605
2153
+ def accept(target); end
2154
+
2155
+ # source://psych//lib/psych/visitors/yaml_tree.rb#617
2156
+ def visit_Symbol(sym); end
2157
+ end
2158
+
2159
+ # source://psych//lib/psych/visitors/yaml_tree.rb#581
2160
+ Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash)
2161
+
2162
+ # This class walks a YAML AST, converting each node to Ruby
2163
+ #
2164
+ # source://psych//lib/psych/visitors/to_ruby.rb#14
2165
+ class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor
2166
+ # @return [ToRuby] a new instance of ToRuby
2167
+ #
2168
+ # source://psych//lib/psych/visitors/to_ruby.rb#23
2169
+ def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end
2170
+
2171
+ # source://psych//lib/psych/visitors/to_ruby.rb#34
2172
+ def accept(target); end
2173
+
2174
+ # Returns the value of attribute class_loader.
2175
+ #
2176
+ # source://psych//lib/psych/visitors/to_ruby.rb#21
2177
+ def class_loader; end
2178
+
2179
+ # source://psych//lib/psych/visitors/to_ruby.rb#352
2180
+ def visit_Psych_Nodes_Alias(o); end
2181
+
2182
+ # source://psych//lib/psych/visitors/to_ruby.rb#344
2183
+ def visit_Psych_Nodes_Document(o); end
2184
+
2185
+ # source://psych//lib/psych/visitors/to_ruby.rb#164
2186
+ def visit_Psych_Nodes_Mapping(o); end
2187
+
2188
+ # source://psych//lib/psych/visitors/to_ruby.rb#128
2189
+ def visit_Psych_Nodes_Scalar(o); end
2190
+
2191
+ # source://psych//lib/psych/visitors/to_ruby.rb#132
2192
+ def visit_Psych_Nodes_Sequence(o); end
2193
+
2194
+ # source://psych//lib/psych/visitors/to_ruby.rb#348
2195
+ def visit_Psych_Nodes_Stream(o); end
2196
+
2197
+ private
2198
+
2199
+ # source://psych//lib/psych/visitors/to_ruby.rb#369
2200
+ def allocate_anon_data(node, members); end
2201
+
2202
+ # source://psych//lib/psych/visitors/to_ruby.rb#434
2203
+ def deduplicate(key); end
2204
+
2205
+ # source://psych//lib/psych/visitors/to_ruby.rb#51
2206
+ def deserialize(o); end
2207
+
2208
+ # source://psych//lib/psych/visitors/to_ruby.rb#451
2209
+ def init_with(o, h, node); end
2210
+
2211
+ # source://psych//lib/psych/visitors/to_ruby.rb#443
2212
+ def merge_key(hash, key, val); end
2213
+
2214
+ # source://psych//lib/psych/visitors/to_ruby.rb#358
2215
+ def register(node, object); end
2216
+
2217
+ # source://psych//lib/psych/visitors/to_ruby.rb#363
2218
+ def register_empty(object); end
2219
+
2220
+ # Convert +klassname+ to a Class
2221
+ #
2222
+ # source://psych//lib/psych/visitors/to_ruby.rb#464
2223
+ def resolve_class(klassname); end
2224
+
2225
+ # source://psych//lib/psych/visitors/to_ruby.rb#446
2226
+ def revive(klass, node); end
2227
+
2228
+ # source://psych//lib/psych/visitors/to_ruby.rb#374
2229
+ def revive_data_members(hash, o); end
2230
+
2231
+ # source://psych//lib/psych/visitors/to_ruby.rb#383
2232
+ def revive_hash(hash, o, tagged = T.unsafe(nil)); end
2233
+
2234
+ class << self
2235
+ # source://psych//lib/psych/visitors/to_ruby.rb#15
2236
+ def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end
2237
+ end
2238
+ end
2239
+
2240
+ # source://psych//lib/psych/visitors/visitor.rb#4
2241
+ class Psych::Visitors::Visitor
2242
+ # source://psych//lib/psych/visitors/visitor.rb#5
2243
+ def accept(target); end
2244
+
2245
+ private
2246
+
2247
+ # source://psych//lib/psych/visitors/visitor.rb#19
2248
+ def dispatch; end
2249
+
2250
+ # source://psych//lib/psych/visitors/visitor.rb#29
2251
+ def visit(target); end
2252
+
2253
+ class << self
2254
+ # @api private
2255
+ #
2256
+ # source://psych//lib/psych/visitors/visitor.rb#12
2257
+ def dispatch_cache; end
2258
+ end
2259
+ end
2260
+
2261
+ # YAMLTree builds a YAML ast given a Ruby object. For example:
2262
+ #
2263
+ # builder = Psych::Visitors::YAMLTree.new
2264
+ # builder << { :foo => 'bar' }
2265
+ # builder.tree # => #<Psych::Nodes::Stream .. }
2266
+ #
2267
+ # source://psych//lib/psych/visitors/yaml_tree.rb#15
2268
+ class Psych::Visitors::YAMLTree < ::Psych::Visitors::Visitor
2269
+ # @return [YAMLTree] a new instance of YAMLTree
2270
+ #
2271
+ # source://psych//lib/psych/visitors/yaml_tree.rb#51
2272
+ def initialize(emitter, ss, options); end
2273
+
2274
+ # source://psych//lib/psych/visitors/yaml_tree.rb#99
2275
+ def <<(object); end
2276
+
2277
+ # source://psych//lib/psych/visitors/yaml_tree.rb#119
2278
+ def accept(target); end
2279
+
2280
+ # source://psych//lib/psych/visitors/yaml_tree.rb#88
2281
+ def finish; end
2282
+
2283
+ # Returns the value of attribute finished.
2284
+ #
2285
+ # source://psych//lib/psych/visitors/yaml_tree.rb#40
2286
+ def finished; end
2287
+
2288
+ # Returns the value of attribute finished.
2289
+ #
2290
+ # source://psych//lib/psych/visitors/yaml_tree.rb#40
2291
+ def finished?; end
2292
+
2293
+ # source://psych//lib/psych/visitors/yaml_tree.rb#99
2294
+ def push(object); end
2295
+
2296
+ # source://psych//lib/psych/visitors/yaml_tree.rb#82
2297
+ def start(encoding = T.unsafe(nil)); end
2298
+
2299
+ # Returns the value of attribute started.
2300
+ #
2301
+ # source://psych//lib/psych/visitors/yaml_tree.rb#40
2302
+ def started; end
2303
+
2304
+ # Returns the value of attribute started.
2305
+ #
2306
+ # source://psych//lib/psych/visitors/yaml_tree.rb#40
2307
+ def started?; end
2308
+
2309
+ # source://psych//lib/psych/visitors/yaml_tree.rb#94
2310
+ def tree; end
2311
+
2312
+ # source://psych//lib/psych/visitors/yaml_tree.rb#386
2313
+ def visit_Array(o); end
2314
+
2315
+ # source://psych//lib/psych/visitors/yaml_tree.rb#412
2316
+ def visit_BasicObject(o); end
2317
+
2318
+ # source://psych//lib/psych/visitors/yaml_tree.rb#286
2319
+ def visit_BigDecimal(o); end
2320
+
2321
+ # @raise [TypeError]
2322
+ #
2323
+ # source://psych//lib/psych/visitors/yaml_tree.rb#349
2324
+ def visit_Class(o); end
2325
+
2326
+ # source://psych//lib/psych/visitors/yaml_tree.rb#259
2327
+ def visit_Complex(o); end
2328
+
2329
+ # source://psych//lib/psych/visitors/yaml_tree.rb#165
2330
+ def visit_Data(o); end
2331
+
2332
+ # source://psych//lib/psych/visitors/yaml_tree.rb#229
2333
+ def visit_Date(o); end
2334
+
2335
+ # source://psych//lib/psych/visitors/yaml_tree.rb#234
2336
+ def visit_DateTime(o); end
2337
+
2338
+ # source://psych//lib/psych/visitors/yaml_tree.rb#149
2339
+ def visit_Delegator(o); end
2340
+
2341
+ # source://psych//lib/psych/visitors/yaml_tree.rb#144
2342
+ def visit_Encoding(o); end
2343
+
2344
+ # source://psych//lib/psych/visitors/yaml_tree.rb#394
2345
+ def visit_Enumerator(o); end
2346
+
2347
+ # source://psych//lib/psych/visitors/yaml_tree.rb#217
2348
+ def visit_Exception(o); end
2349
+
2350
+ # source://psych//lib/psych/visitors/yaml_tree.rb#269
2351
+ def visit_FalseClass(o); end
2352
+
2353
+ # source://psych//lib/psych/visitors/yaml_tree.rb#275
2354
+ def visit_Float(o); end
2355
+
2356
+ # source://psych//lib/psych/visitors/yaml_tree.rb#362
2357
+ def visit_Hash(o); end
2358
+
2359
+ # source://psych//lib/psych/visitors/yaml_tree.rb#269
2360
+ def visit_Integer(o); end
2361
+
2362
+ # @raise [TypeError]
2363
+ #
2364
+ # source://psych//lib/psych/visitors/yaml_tree.rb#344
2365
+ def visit_Module(o); end
2366
+
2367
+ # source://psych//lib/psych/visitors/yaml_tree.rb#221
2368
+ def visit_NameError(o); end
2369
+
2370
+ # source://psych//lib/psych/visitors/yaml_tree.rb#400
2371
+ def visit_NilClass(o); end
2372
+
2373
+ # source://psych//lib/psych/visitors/yaml_tree.rb#149
2374
+ def visit_Object(o); end
2375
+
2376
+ # source://psych//lib/psych/visitors/yaml_tree.rb#136
2377
+ def visit_Psych_Omap(o); end
2378
+
2379
+ # source://psych//lib/psych/visitors/yaml_tree.rb#375
2380
+ def visit_Psych_Set(o); end
2381
+
2382
+ # source://psych//lib/psych/visitors/yaml_tree.rb#354
2383
+ def visit_Range(o); end
2384
+
2385
+ # source://psych//lib/psych/visitors/yaml_tree.rb#246
2386
+ def visit_Rational(o); end
2387
+
2388
+ # source://psych//lib/psych/visitors/yaml_tree.rb#225
2389
+ def visit_Regexp(o); end
2390
+
2391
+ # source://psych//lib/psych/visitors/yaml_tree.rb#290
2392
+ def visit_String(o); end
2393
+
2394
+ # source://psych//lib/psych/visitors/yaml_tree.rb#203
2395
+ def visit_Struct(o); end
2396
+
2397
+ # source://psych//lib/psych/visitors/yaml_tree.rb#404
2398
+ def visit_Symbol(o); end
2399
+
2400
+ # source://psych//lib/psych/visitors/yaml_tree.rb#241
2401
+ def visit_Time(o); end
2402
+
2403
+ # source://psych//lib/psych/visitors/yaml_tree.rb#269
2404
+ def visit_TrueClass(o); end
2405
+
2406
+ private
2407
+
2408
+ # @return [Boolean]
2409
+ #
2410
+ # source://psych//lib/psych/visitors/yaml_tree.rb#426
2411
+ def binary?(string); end
2412
+
2413
+ # source://psych//lib/psych/visitors/yaml_tree.rb#537
2414
+ def dump_coder(o); end
2415
+
2416
+ # source://psych//lib/psych/visitors/yaml_tree.rb#502
2417
+ def dump_exception(o, msg); end
2418
+
2419
+ # source://psych//lib/psych/visitors/yaml_tree.rb#572
2420
+ def dump_ivars(target); end
2421
+
2422
+ # source://psych//lib/psych/visitors/yaml_tree.rb#499
2423
+ def dump_list(o); end
2424
+
2425
+ # source://psych//lib/psych/visitors/yaml_tree.rb#550
2426
+ def emit_coder(c, o); end
2427
+
2428
+ # source://psych//lib/psych/visitors/yaml_tree.rb#528
2429
+ def format_date(date); end
2430
+
2431
+ # source://psych//lib/psych/visitors/yaml_tree.rb#520
2432
+ def format_time(time, utc = T.unsafe(nil)); end
2433
+
2434
+ # source://psych//lib/psych/visitors/yaml_tree.rb#532
2435
+ def register(target, yaml_obj); end
2436
+
2437
+ # source://psych//lib/psych/visitors/yaml_tree.rb#430
2438
+ def visit_array_subclass(o); end
2439
+
2440
+ # source://psych//lib/psych/visitors/yaml_tree.rb#461
2441
+ def visit_hash_subclass(o); end
2442
+
2443
+ class << self
2444
+ # source://psych//lib/psych/visitors/yaml_tree.rb#44
2445
+ def create(options = T.unsafe(nil), emitter = T.unsafe(nil)); end
2446
+ end
2447
+ end
2448
+
2449
+ # source://psych//lib/psych/visitors/yaml_tree.rb#16
2450
+ class Psych::Visitors::YAMLTree::Registrar
2451
+ # @return [Registrar] a new instance of Registrar
2452
+ #
2453
+ # source://psych//lib/psych/visitors/yaml_tree.rb#17
2454
+ def initialize; end
2455
+
2456
+ # source://psych//lib/psych/visitors/yaml_tree.rb#31
2457
+ def id_for(target); end
2458
+
2459
+ # @return [Boolean]
2460
+ #
2461
+ # source://psych//lib/psych/visitors/yaml_tree.rb#27
2462
+ def key?(target); end
2463
+
2464
+ # source://psych//lib/psych/visitors/yaml_tree.rb#35
2465
+ def node_for(target); end
2466
+
2467
+ # source://psych//lib/psych/visitors/yaml_tree.rb#23
2468
+ def register(target, node); end
2469
+ end