expo_notifier 0.1.0

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