e621_export_downloader 0.0.1

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