hank 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.clodignore +32 -0
  3. data/.rubocop.yml +59 -0
  4. data/CLAUDE.md +22 -0
  5. data/Gemfile +11 -0
  6. data/LICENSE +21 -0
  7. data/README.md +70 -0
  8. data/Rakefile +17 -0
  9. data/bin/hank +7 -0
  10. data/hank.gemspec +55 -0
  11. data/lib/hank/cli.rb +162 -0
  12. data/lib/hank/file_selector.rb +204 -0
  13. data/lib/hank/hankfile.rb +70 -0
  14. data/lib/hank/path_utils.rb +47 -0
  15. data/lib/hank/symlink_manager.rb +94 -0
  16. data/lib/hank/validator.rb +65 -0
  17. data/lib/hank/version.rb +6 -0
  18. data/lib/hank.rb +25 -0
  19. data/sorbet/config +5 -0
  20. data/sorbet/rbi/annotations/.gitattributes +1 -0
  21. data/sorbet/rbi/annotations/colorize.rbi +121 -0
  22. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  23. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  24. data/sorbet/rbi/gems/.gitattributes +1 -0
  25. data/sorbet/rbi/gems/ansi.rbi +398 -0
  26. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  27. data/sorbet/rbi/gems/ast.rbi +49 -0
  28. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  29. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  30. data/sorbet/rbi/gems/builder.rbi +58 -0
  31. data/sorbet/rbi/gems/builder@3.3.0.rbi +502 -0
  32. data/sorbet/rbi/gems/citrus.rbi +238 -0
  33. data/sorbet/rbi/gems/citrus@3.0.2.rbi +1234 -0
  34. data/sorbet/rbi/gems/colorize.rbi +82 -0
  35. data/sorbet/rbi/gems/colorize@0.8.1.rbi +152 -0
  36. data/sorbet/rbi/gems/curses.rbi +327 -0
  37. data/sorbet/rbi/gems/curses@1.4.7.rbi +894 -0
  38. data/sorbet/rbi/gems/diffy.rbi +56 -0
  39. data/sorbet/rbi/gems/diffy@3.4.3.rbi +184 -0
  40. data/sorbet/rbi/gems/docile.rbi +36 -0
  41. data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
  42. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  43. data/sorbet/rbi/gems/fiddle.rbi +120 -0
  44. data/sorbet/rbi/gems/fiddle@1.1.6.rbi +9 -0
  45. data/sorbet/rbi/gems/hank.rbi +15 -0
  46. data/sorbet/rbi/gems/json@2.10.2.rbi +2112 -0
  47. data/sorbet/rbi/gems/language_server-protocol.rbi +2868 -0
  48. data/sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi +9 -0
  49. data/sorbet/rbi/gems/lint_roller.rbi +75 -0
  50. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +86 -0
  51. data/sorbet/rbi/gems/logger.rbi +94 -0
  52. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  53. data/sorbet/rbi/gems/minitest-reporters.rbi +104 -0
  54. data/sorbet/rbi/gems/minitest-reporters@1.7.1.rbi +1018 -0
  55. data/sorbet/rbi/gems/minitest.rbi +440 -0
  56. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
  57. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  58. data/sorbet/rbi/gems/parallel.rbi +88 -0
  59. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  60. data/sorbet/rbi/gems/parser.rbi +1545 -0
  61. data/sorbet/rbi/gems/parser@3.3.7.4.rbi +5535 -0
  62. data/sorbet/rbi/gems/prism.rbi +4090 -0
  63. data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
  64. data/sorbet/rbi/gems/racc.rbi +41 -0
  65. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  66. data/sorbet/rbi/gems/rainbow.rbi +122 -0
  67. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  68. data/sorbet/rbi/gems/rake.rbi +649 -0
  69. data/sorbet/rbi/gems/rake@13.2.1.rbi +3033 -0
  70. data/sorbet/rbi/gems/rbi@0.3.1.rbi +6599 -0
  71. data/sorbet/rbi/gems/rbs@3.9.2.rbi +6978 -0
  72. data/sorbet/rbi/gems/regexp_parser.rbi +1039 -0
  73. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3795 -0
  74. data/sorbet/rbi/gems/rubocop-ast.rbi +1470 -0
  75. data/sorbet/rbi/gems/rubocop-ast@1.44.0.rbi +7716 -0
  76. data/sorbet/rbi/gems/rubocop.rbi +10557 -0
  77. data/sorbet/rbi/gems/rubocop@1.75.2.rbi +61860 -0
  78. data/sorbet/rbi/gems/ruby-filemagic.rbi +46 -0
  79. data/sorbet/rbi/gems/ruby-filemagic@0.7.3.rbi +168 -0
  80. data/sorbet/rbi/gems/ruby-progressbar.rbi +321 -0
  81. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  82. data/sorbet/rbi/gems/simplecov-html.rbi +36 -0
  83. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +225 -0
  84. data/sorbet/rbi/gems/simplecov.rbi +435 -0
  85. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  86. data/sorbet/rbi/gems/simplecov_json_formatter.rbi +47 -0
  87. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  88. data/sorbet/rbi/gems/spoom@1.6.1.rbi +7274 -0
  89. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  90. data/sorbet/rbi/gems/thor.rbi +583 -0
  91. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  92. data/sorbet/rbi/gems/toml-rb.rbi +136 -0
  93. data/sorbet/rbi/gems/toml-rb@2.2.0.rbi +419 -0
  94. data/sorbet/rbi/gems/unicode-display_width.rbi +28 -0
  95. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  96. data/sorbet/rbi/gems/unicode-emoji.rbi +18 -0
  97. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  98. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  99. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  100. data/sorbet/tapioca/config.yml +13 -0
  101. data/sorbet/tapioca/require.rb +4 -0
  102. metadata +399 -0
@@ -0,0 +1,502 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `builder` gem.
5
+ # Please instead update this file by running `bin/tapioca gem builder`.
6
+
7
+
8
+ # If the Builder::XChar module is not currently defined, fail on any
9
+ # name clashes in standard library classes.
10
+ #
11
+ # source://builder//lib/builder/xmlbase.rb#4
12
+ module Builder
13
+ class << self
14
+ # source://builder//lib/builder/xchar.rb#13
15
+ def check_for_name_collision(klass, method_name, defined_constant = T.unsafe(nil)); end
16
+ end
17
+ end
18
+
19
+ # Generic error for builder
20
+ #
21
+ # source://builder//lib/builder/xmlbase.rb#7
22
+ class Builder::IllegalBlockError < ::RuntimeError; end
23
+
24
+ # source://builder//lib/builder/xchar.rb#33
25
+ module Builder::XChar
26
+ class << self
27
+ # encode a string per XML rules
28
+ #
29
+ # source://builder//lib/builder/xchar.rb#152
30
+ def encode(string); end
31
+
32
+ # convert a string to valid UTF-8, compensating for a number of
33
+ # common errors.
34
+ #
35
+ # source://builder//lib/builder/xchar.rb#126
36
+ def unicode(string); end
37
+ end
38
+ end
39
+
40
+ # See
41
+ # http://intertwingly.net/stories/2004/04/14/i18n.html#CleaningWindows
42
+ # for details.
43
+ #
44
+ # source://builder//lib/builder/xchar.rb#38
45
+ Builder::XChar::CP1252 = T.let(T.unsafe(nil), Hash)
46
+
47
+ # source://builder//lib/builder/xchar.rb#100
48
+ Builder::XChar::CP1252_DIFFERENCES = T.let(T.unsafe(nil), String)
49
+
50
+ # source://builder//lib/builder/xchar.rb#120
51
+ Builder::XChar::ENCODING_BINARY = T.let(T.unsafe(nil), Encoding)
52
+
53
+ # source://builder//lib/builder/xchar.rb#122
54
+ Builder::XChar::ENCODING_ISO1 = T.let(T.unsafe(nil), Encoding)
55
+
56
+ # source://builder//lib/builder/xchar.rb#121
57
+ Builder::XChar::ENCODING_UTF8 = T.let(T.unsafe(nil), Encoding)
58
+
59
+ # source://builder//lib/builder/xchar.rb#109
60
+ Builder::XChar::INVALID_XML_CHAR = T.let(T.unsafe(nil), Regexp)
61
+
62
+ # See http://www.w3.org/TR/REC-xml/#dt-chardata for details.
63
+ #
64
+ # source://builder//lib/builder/xchar.rb#69
65
+ Builder::XChar::PREDEFINED = T.let(T.unsafe(nil), Hash)
66
+
67
+ # http://www.fileformat.info/info/unicode/char/fffd/index.htm
68
+ #
69
+ # source://builder//lib/builder/xchar.rb#84
70
+ Builder::XChar::REPLACEMENT_CHAR = T.let(T.unsafe(nil), String)
71
+
72
+ # source://builder//lib/builder/xchar.rb#100
73
+ Builder::XChar::UNICODE_EQUIVALENT = T.let(T.unsafe(nil), String)
74
+
75
+ # See http://www.w3.org/TR/REC-xml/#charsets for details.
76
+ #
77
+ # source://builder//lib/builder/xchar.rb#76
78
+ Builder::XChar::VALID = T.let(T.unsafe(nil), Array)
79
+
80
+ # source://builder//lib/builder/xchar.rb#105
81
+ Builder::XChar::XML_PREDEFINED = T.let(T.unsafe(nil), Regexp)
82
+
83
+ # XmlBase is a base class for building XML builders. See
84
+ # Builder::XmlMarkup and Builder::XmlEvents for examples.
85
+ #
86
+ # source://builder//lib/builder/xmlbase.rb#11
87
+ class Builder::XmlBase < ::BasicObject
88
+ # Create an XML markup builder.
89
+ #
90
+ # out :: Object receiving the markup. +out+ must respond to
91
+ # <tt><<</tt>.
92
+ # indent :: Number of spaces used for indentation (0 implies no
93
+ # indentation and no line breaks).
94
+ # initial :: Level of initial indentation.
95
+ # encoding :: When <tt>encoding</tt> and $KCODE are set to 'utf-8'
96
+ # characters aren't converted to character entities in
97
+ # the output stream.
98
+ #
99
+ # @return [XmlBase] a new instance of XmlBase
100
+ #
101
+ # source://builder//lib/builder/xmlbase.rb#27
102
+ def initialize(indent = T.unsafe(nil), initial = T.unsafe(nil), encoding = T.unsafe(nil)); end
103
+
104
+ # Append text to the output target without escaping any markup.
105
+ # May be used within the markup brackets as:
106
+ #
107
+ # builder.p { |x| x << "<br/>HI" } #=> <p><br/>HI</p>
108
+ #
109
+ # This is useful when using non-builder enabled software that
110
+ # generates strings. Just insert the string directly into the
111
+ # builder without changing the inserted markup.
112
+ #
113
+ # It is also useful for stacking builder objects. Builders only
114
+ # use <tt><<</tt> to append to the target, so by supporting this
115
+ # method/operation builders can use other builders as their
116
+ # targets.
117
+ #
118
+ # source://builder//lib/builder/xmlbase.rb#116
119
+ def <<(text); end
120
+
121
+ # @return [Boolean]
122
+ #
123
+ # source://builder//lib/builder/xmlbase.rb#33
124
+ def explicit_nil_handling?; end
125
+
126
+ # Create XML markup based on the name of the method. This method
127
+ # is never invoked directly, but is called for each markup method
128
+ # in the markup block that isn't cached.
129
+ #
130
+ # source://builder//lib/builder/xmlbase.rb#90
131
+ def method_missing(sym, *args, &block); end
132
+
133
+ # For some reason, nil? is sent to the XmlMarkup object. If nil?
134
+ # is not defined and method_missing is invoked, some strange kind
135
+ # of recursion happens. Since nil? won't ever be an XML tag, it
136
+ # is pretty safe to define it here. (Note: this is an example of
137
+ # cargo cult programming,
138
+ # cf. http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming).
139
+ #
140
+ # @return [Boolean]
141
+ #
142
+ # source://builder//lib/builder/xmlbase.rb#126
143
+ def nil?; end
144
+
145
+ # Create a tag named +sym+. Other than the first argument which
146
+ # is the tag name, the arguments are the same as the tags
147
+ # implemented via <tt>method_missing</tt>.
148
+ #
149
+ # source://builder//lib/builder/xmlbase.rb#40
150
+ def tag!(sym, *args, &block); end
151
+
152
+ # Append text to the output target. Escape any markup. May be
153
+ # used within the markup brackets as:
154
+ #
155
+ # builder.p { |b| b.br; b.text! "HI" } #=> <p><br/>HI</p>
156
+ #
157
+ # source://builder//lib/builder/xmlbase.rb#99
158
+ def text!(text); end
159
+
160
+ private
161
+
162
+ # source://builder//lib/builder/xmlbase.rb#134
163
+ def _escape(text); end
164
+
165
+ # source://builder//lib/builder/xmlbase.rb#157
166
+ def _escape_attribute(text); end
167
+
168
+ # source://builder//lib/builder/xmlbase.rb#167
169
+ def _indent; end
170
+
171
+ # source://builder//lib/builder/xmlbase.rb#172
172
+ def _nested_structures(block); end
173
+
174
+ # source://builder//lib/builder/xmlbase.rb#162
175
+ def _newline; end
176
+
177
+ # If XmlBase.cache_method_calls = true, we dynamicly create the method
178
+ # missed as an instance method on the XMLBase object. Because XML
179
+ # documents are usually very repetative in nature, the next node will
180
+ # be handled by the new method instead of method_missing. As
181
+ # method_missing is very slow, this speeds up document generation
182
+ # significantly.
183
+ #
184
+ # source://builder//lib/builder/xmlbase.rb#185
185
+ def cache_method_call(sym); end
186
+
187
+ class << self
188
+ # Returns the value of attribute cache_method_calls.
189
+ #
190
+ # source://builder//lib/builder/xmlbase.rb#14
191
+ def cache_method_calls; end
192
+
193
+ # Sets the attribute cache_method_calls
194
+ #
195
+ # @param value the value to set the attribute cache_method_calls to.
196
+ #
197
+ # source://builder//lib/builder/xmlbase.rb#14
198
+ def cache_method_calls=(_arg0); end
199
+ end
200
+ end
201
+
202
+ # Create a series of SAX-like XML events (e.g. start_tag, end_tag)
203
+ # from the markup code. XmlEvent objects are used in a way similar
204
+ # to XmlMarkup objects, except that a series of events are generated
205
+ # and passed to a handler rather than generating character-based
206
+ # markup.
207
+ #
208
+ # Usage:
209
+ # xe = Builder::XmlEvents.new(hander)
210
+ # xe.title("HI") # Sends start_tag/end_tag/text messages to the handler.
211
+ #
212
+ # Indentation may also be selected by providing value for the
213
+ # indentation size and initial indentation level.
214
+ #
215
+ # xe = Builder::XmlEvents.new(handler, indent_size, initial_indent_level)
216
+ #
217
+ # == XML Event Handler
218
+ #
219
+ # The handler object must expect the following events.
220
+ #
221
+ # [<tt>start_tag(tag, attrs)</tt>]
222
+ # Announces that a new tag has been found. +tag+ is the name of
223
+ # the tag and +attrs+ is a hash of attributes for the tag.
224
+ #
225
+ # [<tt>end_tag(tag)</tt>]
226
+ # Announces that an end tag for +tag+ has been found.
227
+ #
228
+ # [<tt>text(text)</tt>]
229
+ # Announces that a string of characters (+text+) has been found.
230
+ # A series of characters may be broken up into more than one
231
+ # +text+ call, so the client cannot assume that a single
232
+ # callback contains all the text data.
233
+ #
234
+ # source://builder//lib/builder/xmlevents.rb#49
235
+ class Builder::XmlEvents < ::Builder::XmlMarkup
236
+ # source://builder//lib/builder/xmlevents.rb#59
237
+ def _end_tag(sym); end
238
+
239
+ # source://builder//lib/builder/xmlevents.rb#54
240
+ def _start_tag(sym, attrs, end_too = T.unsafe(nil)); end
241
+
242
+ # source://builder//lib/builder/xmlevents.rb#50
243
+ def text!(text); end
244
+ end
245
+
246
+ # Create XML markup easily. All (well, almost all) methods sent to
247
+ # an XmlMarkup object will be translated to the equivalent XML
248
+ # markup. Any method with a block will be treated as an XML markup
249
+ # tag with nested markup in the block.
250
+ #
251
+ # Examples will demonstrate this easier than words. In the
252
+ # following, +xm+ is an +XmlMarkup+ object.
253
+ #
254
+ # xm.em("emphasized") # => <em>emphasized</em>
255
+ # xm.em { xm.b("emp & bold") } # => <em><b>emph &amp; bold</b></em>
256
+ # xm.a("A Link", "href"=>"http://onestepback.org")
257
+ # # => <a href="http://onestepback.org">A Link</a>
258
+ # xm.div { xm.br } # => <div><br/></div>
259
+ # xm.target("name"=>"compile", "option"=>"fast")
260
+ # # => <target option="fast" name="compile"\>
261
+ # # NOTE: order of attributes is not specified.
262
+ #
263
+ # xm.instruct! # <?xml version="1.0" encoding="UTF-8"?>
264
+ # xm.html { # <html>
265
+ # xm.head { # <head>
266
+ # xm.title("History") # <title>History</title>
267
+ # } # </head>
268
+ # xm.body { # <body>
269
+ # xm.comment! "HI" # <!-- HI -->
270
+ # xm.h1("Header") # <h1>Header</h1>
271
+ # xm.p("paragraph") # <p>paragraph</p>
272
+ # } # </body>
273
+ # } # </html>
274
+ #
275
+ # == Notes:
276
+ #
277
+ # * The order that attributes are inserted in markup tags is
278
+ # undefined.
279
+ #
280
+ # * Sometimes you wish to insert text without enclosing tags. Use
281
+ # the <tt>text!</tt> method to accomplish this.
282
+ #
283
+ # Example:
284
+ #
285
+ # xm.div { # <div>
286
+ # xm.text! "line"; xm.br # line<br/>
287
+ # xm.text! "another line"; xmbr # another line<br/>
288
+ # } # </div>
289
+ #
290
+ # * The special XML characters <, >, and & are converted to &lt;,
291
+ # &gt; and &amp; automatically. Use the <tt><<</tt> operation to
292
+ # insert text without modification.
293
+ #
294
+ # * Sometimes tags use special characters not allowed in ruby
295
+ # identifiers. Use the <tt>tag!</tt> method to handle these
296
+ # cases.
297
+ #
298
+ # Example:
299
+ #
300
+ # xml.tag!("SOAP:Envelope") { ... }
301
+ #
302
+ # will produce ...
303
+ #
304
+ # <SOAP:Envelope> ... </SOAP:Envelope>"
305
+ #
306
+ # <tt>tag!</tt> will also take text and attribute arguments (after
307
+ # the tag name) like normal markup methods. (But see the next
308
+ # bullet item for a better way to handle XML namespaces).
309
+ #
310
+ # * Direct support for XML namespaces is now available. If the
311
+ # first argument to a tag call is a symbol, it will be joined to
312
+ # the tag to produce a namespace:tag combination. It is easier to
313
+ # show this than describe it.
314
+ #
315
+ # xml.SOAP :Envelope do ... end
316
+ #
317
+ # Just put a space before the colon in a namespace to produce the
318
+ # right form for builder (e.g. "<tt>SOAP:Envelope</tt>" =>
319
+ # "<tt>xml.SOAP :Envelope</tt>")
320
+ #
321
+ # * XmlMarkup builds the markup in any object (called a _target_)
322
+ # that accepts the <tt><<</tt> method. If no target is given,
323
+ # then XmlMarkup defaults to a string target.
324
+ #
325
+ # Examples:
326
+ #
327
+ # xm = Builder::XmlMarkup.new
328
+ # result = xm.title("yada")
329
+ # # result is a string containing the markup.
330
+ #
331
+ # buffer = ""
332
+ # xm = Builder::XmlMarkup.new(buffer)
333
+ # # The markup is appended to buffer (using <<)
334
+ #
335
+ # xm = Builder::XmlMarkup.new(STDOUT)
336
+ # # The markup is written to STDOUT (using <<)
337
+ #
338
+ # xm = Builder::XmlMarkup.new
339
+ # x2 = Builder::XmlMarkup.new(:target=>xm)
340
+ # # Markup written to +x2+ will be send to +xm+.
341
+ #
342
+ # * Indentation is enabled by providing the number of spaces to
343
+ # indent for each level as a second argument to XmlBuilder.new.
344
+ # Initial indentation may be specified using a third parameter.
345
+ #
346
+ # Example:
347
+ #
348
+ # xm = Builder::XmlMarkup.new(:indent=>2)
349
+ # # xm will produce nicely formatted and indented XML.
350
+ #
351
+ # xm = Builder::XmlMarkup.new(:indent=>2, :margin=>4)
352
+ # # xm will produce nicely formatted and indented XML with 2
353
+ # # spaces per indent and an over all indentation level of 4.
354
+ #
355
+ # builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2)
356
+ # builder.name { |b| b.first("Jim"); b.last("Weirich") }
357
+ # # prints:
358
+ # # <name>
359
+ # # <first>Jim</first>
360
+ # # <last>Weirich</last>
361
+ # # </name>
362
+ #
363
+ # * The instance_eval implementation which forces self to refer to
364
+ # the message receiver as self is now obsolete. We now use normal
365
+ # block calls to execute the markup block. This means that all
366
+ # markup methods must now be explicitly send to the xml builder.
367
+ # For instance, instead of
368
+ #
369
+ # xml.div { strong("text") }
370
+ #
371
+ # you need to write:
372
+ #
373
+ # xml.div { xml.strong("text") }
374
+ #
375
+ # Although more verbose, the subtle change in semantics within the
376
+ # block was found to be prone to error. To make this change a
377
+ # little less cumbersome, the markup block now gets the markup
378
+ # object sent as an argument, allowing you to use a shorter alias
379
+ # within the block.
380
+ #
381
+ # For example:
382
+ #
383
+ # xml_builder = Builder::XmlMarkup.new
384
+ # xml_builder.div { |xml|
385
+ # xml.strong("text")
386
+ # }
387
+ #
388
+ # source://builder//lib/builder/xmlmarkup.rb#161
389
+ class Builder::XmlMarkup < ::Builder::XmlBase
390
+ # Create an XML markup builder. Parameters are specified by an
391
+ # option hash.
392
+ #
393
+ # :target => <em>target_object</em>::
394
+ # Object receiving the markup. +target_object+ must respond to
395
+ # the <tt><<(<em>a_string</em>)</tt> operator and return
396
+ # itself. The default target is a plain string target.
397
+ #
398
+ # :indent => <em>indentation</em>::
399
+ # Number of spaces used for indentation. The default is no
400
+ # indentation and no line breaks.
401
+ #
402
+ # :margin => <em>initial_indentation_level</em>::
403
+ # Amount of initial indentation (specified in levels, not
404
+ # spaces).
405
+ #
406
+ # :quote => <em>:single</em>::
407
+ # Use single quotes for attributes rather than double quotes.
408
+ #
409
+ # :escape_attrs => <em>OBSOLETE</em>::
410
+ # The :escape_attrs option is no longer supported by builder
411
+ # (and will be quietly ignored). String attribute values are
412
+ # now automatically escaped. If you need unescaped attribute
413
+ # values (perhaps you are using entities in the attribute
414
+ # values), then give the value as a Symbol. This allows much
415
+ # finer control over escaping attribute values.
416
+ #
417
+ # @return [XmlMarkup] a new instance of XmlMarkup
418
+ #
419
+ # source://builder//lib/builder/xmlmarkup.rb#190
420
+ def initialize(options = T.unsafe(nil)); end
421
+
422
+ # Insert a CDATA section into the XML markup.
423
+ #
424
+ # For example:
425
+ #
426
+ # xml.cdata!("text to be included in cdata")
427
+ # #=> <![CDATA[text to be included in cdata]]>
428
+ #
429
+ # source://builder//lib/builder/xmlmarkup.rb#270
430
+ def cdata!(text); end
431
+
432
+ # source://builder//lib/builder/xmlmarkup.rb#275
433
+ def cdata_value!(open, text); end
434
+
435
+ # source://builder//lib/builder/xmlmarkup.rb#204
436
+ def comment!(comment_text); end
437
+
438
+ # Insert an XML declaration into the XML markup.
439
+ #
440
+ # For example:
441
+ #
442
+ # xml.declare! :ELEMENT, :blah, "yada"
443
+ # # => <!ELEMENT blah "yada">
444
+ #
445
+ # source://builder//lib/builder/xmlmarkup.rb#215
446
+ def declare!(inst, *args, &block); end
447
+
448
+ # Insert a processing instruction into the XML markup. E.g.
449
+ #
450
+ # For example:
451
+ #
452
+ # xml.instruct!
453
+ # #=> <?xml version="1.0" encoding="UTF-8"?>
454
+ # xml.instruct! :aaa, :bbb=>"ccc"
455
+ # #=> <?aaa bbb="ccc"?>
456
+ #
457
+ # Note: If the encoding is setup to "UTF-8" and the value of
458
+ # $KCODE is "UTF8", then builder will emit UTF-8 encoded strings
459
+ # rather than the entity encoding normally used.
460
+ #
461
+ # source://builder//lib/builder/xmlmarkup.rb#248
462
+ def instruct!(directive_tag = T.unsafe(nil), attrs = T.unsafe(nil)); end
463
+
464
+ # Return the target of the builder.
465
+ #
466
+ # source://builder//lib/builder/xmlmarkup.rb#200
467
+ def target!; end
468
+
469
+ private
470
+
471
+ # source://builder//lib/builder/xmlmarkup.rb#326
472
+ def _attr_value(value); end
473
+
474
+ # Insert an ending tag.
475
+ #
476
+ # source://builder//lib/builder/xmlmarkup.rb#310
477
+ def _end_tag(sym); end
478
+
479
+ # source://builder//lib/builder/xmlmarkup.rb#335
480
+ def _ensure_no_block(got_block); end
481
+
482
+ # Insert the attributes (given in the hash).
483
+ #
484
+ # source://builder//lib/builder/xmlmarkup.rb#315
485
+ def _insert_attributes(attrs, order = T.unsafe(nil)); end
486
+
487
+ # Insert special instruction.
488
+ #
489
+ # source://builder//lib/builder/xmlmarkup.rb#291
490
+ def _special(open, close, data = T.unsafe(nil), attrs = T.unsafe(nil), order = T.unsafe(nil)); end
491
+
492
+ # Start an XML tag. If <tt>end_too</tt> is true, then the start
493
+ # tag is also the end tag (e.g. <br/>
494
+ #
495
+ # source://builder//lib/builder/xmlmarkup.rb#302
496
+ def _start_tag(sym, attrs, end_too = T.unsafe(nil)); end
497
+
498
+ # Insert text directly in to the builder's target.
499
+ #
500
+ # source://builder//lib/builder/xmlmarkup.rb#286
501
+ def _text(text); end
502
+ end