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