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