sorbet-result 1.2.0 → 1.4.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile.lock +74 -51
  5. data/README.md +1 -1
  6. data/lib/typed/no_payload_on_failure_error.rb +8 -3
  7. data/lib/typed/result.rb +1 -1
  8. data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +3 -3
  9. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  10. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  11. data/sorbet/rbi/gems/erb@5.0.1.rbi +878 -0
  12. data/sorbet/rbi/gems/{erubi@1.13.0.rbi → erubi@1.13.1.rbi} +14 -9
  13. data/sorbet/rbi/gems/{json@2.7.5.rbi → json@2.12.2.rbi} +654 -232
  14. data/sorbet/rbi/gems/{language_server-protocol@3.17.0.3.rbi → language_server-protocol@3.17.0.5.rbi} +11 -5
  15. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  16. data/sorbet/rbi/gems/{minitest@5.25.1.rbi → minitest@5.25.5.rbi} +227 -220
  17. data/sorbet/rbi/gems/{parser@3.3.5.1.rbi → parser@3.3.8.0.rbi} +215 -199
  18. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  19. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  20. data/sorbet/rbi/gems/{prism@1.2.0.rbi → prism@1.4.0.rbi} +6569 -3922
  21. data/sorbet/rbi/gems/{psych@5.1.2.rbi → psych@5.2.6.rbi} +973 -236
  22. data/sorbet/rbi/gems/{rake@13.2.1.rbi → rake@13.3.0.rbi} +15 -12
  23. data/sorbet/rbi/gems/{rbi@0.2.1.rbi → rbi@0.3.6.rbi} +3340 -982
  24. data/sorbet/rbi/gems/rbs@3.9.4.rbi +6976 -0
  25. data/sorbet/rbi/gems/{regexp_parser@2.9.2.rbi → regexp_parser@2.10.0.rbi} +193 -170
  26. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5243 -0
  27. data/sorbet/rbi/gems/{rubocop-ast@1.33.1.rbi → rubocop-ast@1.45.1.rbi} +1069 -826
  28. data/sorbet/rbi/gems/{rubocop@1.66.1.rbi → rubocop@1.75.8.rbi} +7880 -4054
  29. data/sorbet/rbi/gems/{spoom@1.5.0.rbi → spoom@1.6.3.rbi} +3013 -960
  30. data/sorbet/rbi/gems/{standard@1.41.1.rbi → standard@1.50.0.rbi} +68 -59
  31. data/sorbet/rbi/gems/{tapioca@0.16.3.rbi → tapioca@0.16.11.rbi} +273 -248
  32. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  33. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  34. metadata +38 -34
  35. data/.tool-versions +0 -1
  36. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +0 -66
  37. /data/sorbet/rbi/gems/{io-console@0.7.2.rbi → io-console@0.8.0.rbi} +0 -0
  38. /data/sorbet/rbi/gems/{parallel@1.26.3.rbi → parallel@1.27.0.rbi} +0 -0
  39. /data/sorbet/rbi/gems/{reline@0.5.10.rbi → reline@0.6.1.rbi} +0 -0
  40. /data/sorbet/rbi/gems/{rubocop-performance@1.22.1.rbi → rubocop-performance@1.25.0.rbi} +0 -0
  41. /data/sorbet/rbi/gems/{rubocop-sorbet@0.7.8.rbi → rubocop-sorbet@0.9.0.rbi} +0 -0
  42. /data/sorbet/rbi/gems/{standard-performance@1.5.0.rbi → standard-performance@1.8.0.rbi} +0 -0
  43. /data/sorbet/rbi/gems/{standard-sorbet@0.0.2.rbi → standard-sorbet@0.0.3.rbi} +0 -0
  44. /data/sorbet/rbi/gems/{stringio@3.1.1.rbi → stringio@3.1.7.rbi} +0 -0
@@ -0,0 +1,878 @@
1
+ # typed: false
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `erb` gem.
5
+ # Please instead update this file by running `bin/tapioca gem erb`.
6
+
7
+
8
+ # = ERB -- Ruby Templating
9
+ #
10
+ # == Introduction
11
+ #
12
+ # ERB provides an easy to use but powerful templating system for Ruby. Using
13
+ # ERB, actual Ruby code can be added to any plain text document for the
14
+ # purposes of generating document information details and/or flow control.
15
+ #
16
+ # A very simple example is this:
17
+ #
18
+ # require 'erb'
19
+ #
20
+ # x = 42
21
+ # template = ERB.new <<-EOF
22
+ # The value of x is: <%= x %>
23
+ # EOF
24
+ # puts template.result(binding)
25
+ #
26
+ # <em>Prints:</em> The value of x is: 42
27
+ #
28
+ # More complex examples are given below.
29
+ #
30
+ #
31
+ # == Recognized Tags
32
+ #
33
+ # ERB recognizes certain tags in the provided template and converts them based
34
+ # on the rules below:
35
+ #
36
+ # <% Ruby code -- inline with output %>
37
+ # <%= Ruby expression -- replace with result %>
38
+ # <%# comment -- ignored -- useful in testing %> (`<% #` doesn't work. Don't use Ruby comments.)
39
+ # % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new)
40
+ # %% replaced with % if first thing on a line and % processing is used
41
+ # <%% or %%> -- replace with <% or %> respectively
42
+ #
43
+ # All other text is passed through ERB filtering unchanged.
44
+ #
45
+ #
46
+ # == Options
47
+ #
48
+ # There are several settings you can change when you use ERB:
49
+ # * the nature of the tags that are recognized;
50
+ # * the binding used to resolve local variables in the template.
51
+ #
52
+ # See the ERB.new and ERB#result methods for more detail.
53
+ #
54
+ # == Character encodings
55
+ #
56
+ # ERB (or Ruby code generated by ERB) returns a string in the same
57
+ # character encoding as the input string. When the input string has
58
+ # a magic comment, however, it returns a string in the encoding specified
59
+ # by the magic comment.
60
+ #
61
+ # # -*- coding: utf-8 -*-
62
+ # require 'erb'
63
+ #
64
+ # template = ERB.new <<EOF
65
+ # <%#-*- coding: Big5 -*-%>
66
+ # \_\_ENCODING\_\_ is <%= \_\_ENCODING\_\_ %>.
67
+ # EOF
68
+ # puts template.result
69
+ #
70
+ # <em>Prints:</em> \_\_ENCODING\_\_ is Big5.
71
+ #
72
+ #
73
+ # == Examples
74
+ #
75
+ # === Plain Text
76
+ #
77
+ # ERB is useful for any generic templating situation. Note that in this example, we use the
78
+ # convenient "% at start of line" tag, and we quote the template literally with
79
+ # <tt>%q{...}</tt> to avoid trouble with the backslash.
80
+ #
81
+ # require "erb"
82
+ #
83
+ # # Create template.
84
+ # template = %q{
85
+ # From: James Edward Gray II <james@grayproductions.net>
86
+ # To: <%= to %>
87
+ # Subject: Addressing Needs
88
+ #
89
+ # <%= to[/\w+/] %>:
90
+ #
91
+ # Just wanted to send a quick note assuring that your needs are being
92
+ # addressed.
93
+ #
94
+ # I want you to know that my team will keep working on the issues,
95
+ # especially:
96
+ #
97
+ # <%# ignore numerous minor requests -- focus on priorities %>
98
+ # % priorities.each do |priority|
99
+ # * <%= priority %>
100
+ # % end
101
+ #
102
+ # Thanks for your patience.
103
+ #
104
+ # James Edward Gray II
105
+ # }.gsub(/^ /, '')
106
+ #
107
+ # message = ERB.new(template, trim_mode: "%<>")
108
+ #
109
+ # # Set up template data.
110
+ # to = "Community Spokesman <spokesman@ruby_community.org>"
111
+ # priorities = [ "Run Ruby Quiz",
112
+ # "Document Modules",
113
+ # "Answer Questions on Ruby Talk" ]
114
+ #
115
+ # # Produce result.
116
+ # email = message.result
117
+ # puts email
118
+ #
119
+ # <i>Generates:</i>
120
+ #
121
+ # From: James Edward Gray II <james@grayproductions.net>
122
+ # To: Community Spokesman <spokesman@ruby_community.org>
123
+ # Subject: Addressing Needs
124
+ #
125
+ # Community:
126
+ #
127
+ # Just wanted to send a quick note assuring that your needs are being addressed.
128
+ #
129
+ # I want you to know that my team will keep working on the issues, especially:
130
+ #
131
+ # * Run Ruby Quiz
132
+ # * Document Modules
133
+ # * Answer Questions on Ruby Talk
134
+ #
135
+ # Thanks for your patience.
136
+ #
137
+ # James Edward Gray II
138
+ #
139
+ # === Ruby in HTML
140
+ #
141
+ # ERB is often used in <tt>.rhtml</tt> files (HTML with embedded Ruby). Notice the need in
142
+ # this example to provide a special binding when the template is run, so that the instance
143
+ # variables in the Product object can be resolved.
144
+ #
145
+ # require "erb"
146
+ #
147
+ # # Build template data class.
148
+ # class Product
149
+ # def initialize( code, name, desc, cost )
150
+ # @code = code
151
+ # @name = name
152
+ # @desc = desc
153
+ # @cost = cost
154
+ #
155
+ # @features = [ ]
156
+ # end
157
+ #
158
+ # def add_feature( feature )
159
+ # @features << feature
160
+ # end
161
+ #
162
+ # # Support templating of member data.
163
+ # def get_binding
164
+ # binding
165
+ # end
166
+ #
167
+ # # ...
168
+ # end
169
+ #
170
+ # # Create template.
171
+ # template = %{
172
+ # <html>
173
+ # <head><title>Ruby Toys -- <%= @name %></title></head>
174
+ # <body>
175
+ #
176
+ # <h1><%= @name %> (<%= @code %>)</h1>
177
+ # <p><%= @desc %></p>
178
+ #
179
+ # <ul>
180
+ # <% @features.each do |f| %>
181
+ # <li><b><%= f %></b></li>
182
+ # <% end %>
183
+ # </ul>
184
+ #
185
+ # <p>
186
+ # <% if @cost < 10 %>
187
+ # <b>Only <%= @cost %>!!!</b>
188
+ # <% else %>
189
+ # Call for a price, today!
190
+ # <% end %>
191
+ # </p>
192
+ #
193
+ # </body>
194
+ # </html>
195
+ # }.gsub(/^ /, '')
196
+ #
197
+ # rhtml = ERB.new(template)
198
+ #
199
+ # # Set up template data.
200
+ # toy = Product.new( "TZ-1002",
201
+ # "Rubysapien",
202
+ # "Geek's Best Friend! Responds to Ruby commands...",
203
+ # 999.95 )
204
+ # toy.add_feature("Listens for verbal commands in the Ruby language!")
205
+ # toy.add_feature("Ignores Perl, Java, and all C variants.")
206
+ # toy.add_feature("Karate-Chop Action!!!")
207
+ # toy.add_feature("Matz signature on left leg.")
208
+ # toy.add_feature("Gem studded eyes... Rubies, of course!")
209
+ #
210
+ # # Produce result.
211
+ # rhtml.run(toy.get_binding)
212
+ #
213
+ # <i>Generates (some blank lines removed):</i>
214
+ #
215
+ # <html>
216
+ # <head><title>Ruby Toys -- Rubysapien</title></head>
217
+ # <body>
218
+ #
219
+ # <h1>Rubysapien (TZ-1002)</h1>
220
+ # <p>Geek's Best Friend! Responds to Ruby commands...</p>
221
+ #
222
+ # <ul>
223
+ # <li><b>Listens for verbal commands in the Ruby language!</b></li>
224
+ # <li><b>Ignores Perl, Java, and all C variants.</b></li>
225
+ # <li><b>Karate-Chop Action!!!</b></li>
226
+ # <li><b>Matz signature on left leg.</b></li>
227
+ # <li><b>Gem studded eyes... Rubies, of course!</b></li>
228
+ # </ul>
229
+ #
230
+ # <p>
231
+ # Call for a price, today!
232
+ # </p>
233
+ #
234
+ # </body>
235
+ # </html>
236
+ #
237
+ #
238
+ # == Notes
239
+ #
240
+ # There are a variety of templating solutions available in various Ruby projects.
241
+ # For example, RDoc, distributed with Ruby, uses its own template engine, which
242
+ # can be reused elsewhere.
243
+ #
244
+ # Other popular engines could be found in the corresponding
245
+ # {Category}[https://www.ruby-toolbox.com/categories/template_engines] of
246
+ # The Ruby Toolbox.
247
+ #
248
+ # source://erb//lib/erb/version.rb#2
249
+ class ERB
250
+ # Constructs a new ERB object with the template specified in _str_.
251
+ #
252
+ # An ERB object works by building a chunk of Ruby code that will output
253
+ # the completed template when run.
254
+ #
255
+ # If _trim_mode_ is passed a String containing one or more of the following
256
+ # modifiers, ERB will adjust its code generation as listed:
257
+ #
258
+ # % enables Ruby code processing for lines beginning with %
259
+ # <> omit newline for lines starting with <% and ending in %>
260
+ # > omit newline for lines ending in %>
261
+ # - omit blank lines ending in -%>
262
+ #
263
+ # _eoutvar_ can be used to set the name of the variable ERB will build up
264
+ # its output in. This is useful when you need to run multiple ERB
265
+ # templates through the same binding and/or when you want to control where
266
+ # output ends up. Pass the name of the variable to be used inside a String.
267
+ #
268
+ # === Example
269
+ #
270
+ # require "erb"
271
+ #
272
+ # # build data class
273
+ # class Listings
274
+ # PRODUCT = { :name => "Chicken Fried Steak",
275
+ # :desc => "A well messaged pattie, breaded and fried.",
276
+ # :cost => 9.95 }
277
+ #
278
+ # attr_reader :product, :price
279
+ #
280
+ # def initialize( product = "", price = "" )
281
+ # @product = product
282
+ # @price = price
283
+ # end
284
+ #
285
+ # def build
286
+ # b = binding
287
+ # # create and run templates, filling member data variables
288
+ # ERB.new(<<~'END_PRODUCT', trim_mode: "", eoutvar: "@product").result b
289
+ # <%= PRODUCT[:name] %>
290
+ # <%= PRODUCT[:desc] %>
291
+ # END_PRODUCT
292
+ # ERB.new(<<~'END_PRICE', trim_mode: "", eoutvar: "@price").result b
293
+ # <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %>
294
+ # <%= PRODUCT[:desc] %>
295
+ # END_PRICE
296
+ # end
297
+ # end
298
+ #
299
+ # # setup template data
300
+ # listings = Listings.new
301
+ # listings.build
302
+ #
303
+ # puts listings.product + "\n" + listings.price
304
+ #
305
+ # _Generates_
306
+ #
307
+ # Chicken Fried Steak
308
+ # A well massaged pattie, breaded and fried.
309
+ #
310
+ # Chicken Fried Steak -- 9.95
311
+ # A well massaged pattie, breaded and fried.
312
+ #
313
+ # @return [ERB] a new instance of ERB
314
+ #
315
+ # source://erb//lib/erb.rb#334
316
+ def initialize(str, safe_level = T.unsafe(nil), legacy_trim_mode = T.unsafe(nil), legacy_eoutvar = T.unsafe(nil), trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end
317
+
318
+ # Define unnamed class which has _methodname_ as instance method, and return it.
319
+ #
320
+ # example:
321
+ # class MyClass_
322
+ # def initialize(arg1, arg2)
323
+ # @arg1 = arg1; @arg2 = arg2
324
+ # end
325
+ # end
326
+ # filename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml
327
+ # erb = ERB.new(File.read(filename))
328
+ # erb.filename = filename
329
+ # MyClass = erb.def_class(MyClass_, 'render()')
330
+ # print MyClass.new('foo', 123).render()
331
+ #
332
+ # source://erb//lib/erb.rb#499
333
+ def def_class(superklass = T.unsafe(nil), methodname = T.unsafe(nil)); end
334
+
335
+ # Define _methodname_ as instance method of _mod_ from compiled Ruby source.
336
+ #
337
+ # example:
338
+ # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml
339
+ # erb = ERB.new(File.read(filename))
340
+ # erb.def_method(MyClass, 'render(arg1, arg2)', filename)
341
+ # print MyClass.new.render('foo', 123)
342
+ #
343
+ # source://erb//lib/erb.rb#463
344
+ def def_method(mod, methodname, fname = T.unsafe(nil)); end
345
+
346
+ # Create unnamed module, define _methodname_ as instance method of it, and return it.
347
+ #
348
+ # example:
349
+ # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml
350
+ # erb = ERB.new(File.read(filename))
351
+ # erb.filename = filename
352
+ # MyModule = erb.def_module('render(arg1, arg2)')
353
+ # class MyClass
354
+ # include MyModule
355
+ # end
356
+ #
357
+ # source://erb//lib/erb.rb#480
358
+ def def_module(methodname = T.unsafe(nil)); end
359
+
360
+ # The encoding to eval
361
+ #
362
+ # source://erb//lib/erb.rb#369
363
+ def encoding; end
364
+
365
+ # The optional _filename_ argument passed to Kernel#eval when the ERB code
366
+ # is run
367
+ #
368
+ # source://erb//lib/erb.rb#373
369
+ def filename; end
370
+
371
+ # The optional _filename_ argument passed to Kernel#eval when the ERB code
372
+ # is run
373
+ #
374
+ # source://erb//lib/erb.rb#373
375
+ def filename=(_arg0); end
376
+
377
+ # The optional _lineno_ argument passed to Kernel#eval when the ERB code
378
+ # is run
379
+ #
380
+ # source://erb//lib/erb.rb#377
381
+ def lineno; end
382
+
383
+ # The optional _lineno_ argument passed to Kernel#eval when the ERB code
384
+ # is run
385
+ #
386
+ # source://erb//lib/erb.rb#377
387
+ def lineno=(_arg0); end
388
+
389
+ # Sets optional filename and line number that will be used in ERB code
390
+ # evaluation and error reporting. See also #filename= and #lineno=
391
+ #
392
+ # erb = ERB.new('<%= some_x %>')
393
+ # erb.render
394
+ # # undefined local variable or method `some_x'
395
+ # # from (erb):1
396
+ #
397
+ # erb.location = ['file.erb', 3]
398
+ # # All subsequent error reporting would use new location
399
+ # erb.render
400
+ # # undefined local variable or method `some_x'
401
+ # # from file.erb:4
402
+ #
403
+ # source://erb//lib/erb.rb#394
404
+ def location=(_arg0); end
405
+
406
+ # Creates a new compiler for ERB. See ERB::Compiler.new for details
407
+ #
408
+ # source://erb//lib/erb.rb#361
409
+ def make_compiler(trim_mode); end
410
+
411
+ # Executes the generated ERB code to produce a completed template, returning
412
+ # the results of that code.
413
+ #
414
+ # _b_ accepts a Binding object which is used to set the context of
415
+ # code evaluation.
416
+ #
417
+ # source://erb//lib/erb.rb#423
418
+ def result(b = T.unsafe(nil)); end
419
+
420
+ # Render a template on a new toplevel binding with local variables specified
421
+ # by a Hash object.
422
+ #
423
+ # source://erb//lib/erb.rb#432
424
+ def result_with_hash(hash); end
425
+
426
+ # Generate results and print them. (see ERB#result)
427
+ #
428
+ # source://erb//lib/erb.rb#412
429
+ def run(b = T.unsafe(nil)); end
430
+
431
+ # Can be used to set _eoutvar_ as described in ERB::new. It's probably
432
+ # easier to just use the constructor though, since calling this method
433
+ # requires the setup of an ERB _compiler_ object.
434
+ #
435
+ # source://erb//lib/erb.rb#404
436
+ def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end
437
+
438
+ # The Ruby code generated by ERB
439
+ #
440
+ # source://erb//lib/erb.rb#366
441
+ def src; end
442
+
443
+ private
444
+
445
+ # Returns a new binding each time *near* TOPLEVEL_BINDING for runs that do
446
+ # not specify a binding.
447
+ #
448
+ # source://erb//lib/erb.rb#444
449
+ def new_toplevel(vars = T.unsafe(nil)); end
450
+
451
+ class << self
452
+ # Returns revision information for the erb.rb module.
453
+ #
454
+ # source://erb//lib/erb.rb#266
455
+ def version; end
456
+ end
457
+ end
458
+
459
+ # --
460
+ # ERB::Compiler
461
+ #
462
+ # Compiles ERB templates into Ruby code; the compiled code produces the
463
+ # template result when evaluated. ERB::Compiler provides hooks to define how
464
+ # generated output is handled.
465
+ #
466
+ # Internally ERB does something like this to generate the code returned by
467
+ # ERB#src:
468
+ #
469
+ # compiler = ERB::Compiler.new('<>')
470
+ # compiler.pre_cmd = ["_erbout=+''"]
471
+ # compiler.put_cmd = "_erbout.<<"
472
+ # compiler.insert_cmd = "_erbout.<<"
473
+ # compiler.post_cmd = ["_erbout"]
474
+ #
475
+ # code, enc = compiler.compile("Got <%= obj %>!\n")
476
+ # puts code
477
+ #
478
+ # <i>Generates</i>:
479
+ #
480
+ # #coding:UTF-8
481
+ # _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout
482
+ #
483
+ # By default the output is sent to the print method. For example:
484
+ #
485
+ # compiler = ERB::Compiler.new('<>')
486
+ # code, enc = compiler.compile("Got <%= obj %>!\n")
487
+ # puts code
488
+ #
489
+ # <i>Generates</i>:
490
+ #
491
+ # #coding:UTF-8
492
+ # print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze
493
+ #
494
+ # == Evaluation
495
+ #
496
+ # The compiled code can be used in any context where the names in the code
497
+ # correctly resolve. Using the last example, each of these print 'Got It!'
498
+ #
499
+ # Evaluate using a variable:
500
+ #
501
+ # obj = 'It'
502
+ # eval code
503
+ #
504
+ # Evaluate using an input:
505
+ #
506
+ # mod = Module.new
507
+ # mod.module_eval %{
508
+ # def get(obj)
509
+ # #{code}
510
+ # end
511
+ # }
512
+ # extend mod
513
+ # get('It')
514
+ #
515
+ # Evaluate using an accessor:
516
+ #
517
+ # klass = Class.new Object
518
+ # klass.class_eval %{
519
+ # attr_accessor :obj
520
+ # def initialize(obj)
521
+ # @obj = obj
522
+ # end
523
+ # def get_it
524
+ # #{code}
525
+ # end
526
+ # }
527
+ # klass.new('It').get_it
528
+ #
529
+ # Good! See also ERB#def_method, ERB#def_module, and ERB#def_class.
530
+ #
531
+ # source://erb//lib/erb/compiler.rb#73
532
+ class ERB::Compiler
533
+ # Construct a new compiler using the trim_mode. See ERB::new for available
534
+ # trim modes.
535
+ #
536
+ # @return [Compiler] a new instance of Compiler
537
+ #
538
+ # source://erb//lib/erb/compiler.rb#433
539
+ def initialize(trim_mode); end
540
+
541
+ # source://erb//lib/erb/compiler.rb#315
542
+ def add_insert_cmd(out, content); end
543
+
544
+ # source://erb//lib/erb/compiler.rb#311
545
+ def add_put_cmd(out, content); end
546
+
547
+ # Compiles an ERB template into Ruby code. Returns an array of the code
548
+ # and encoding like ["code", Encoding].
549
+ #
550
+ # @raise [ArgumentError]
551
+ #
552
+ # source://erb//lib/erb/compiler.rb#321
553
+ def compile(s); end
554
+
555
+ # source://erb//lib/erb/compiler.rb#381
556
+ def compile_content(stag, out); end
557
+
558
+ # source://erb//lib/erb/compiler.rb#368
559
+ def compile_etag(etag, out, scanner); end
560
+
561
+ # source://erb//lib/erb/compiler.rb#344
562
+ def compile_stag(stag, out, scanner); end
563
+
564
+ # The command to handle text that is inserted prior to a newline
565
+ #
566
+ # source://erb//lib/erb/compiler.rb#446
567
+ def insert_cmd; end
568
+
569
+ # The command to handle text that is inserted prior to a newline
570
+ #
571
+ # source://erb//lib/erb/compiler.rb#446
572
+ def insert_cmd=(_arg0); end
573
+
574
+ # source://erb//lib/erb/compiler.rb#427
575
+ def make_scanner(src); end
576
+
577
+ # Returns the value of attribute percent.
578
+ #
579
+ # source://erb//lib/erb/compiler.rb#440
580
+ def percent; end
581
+
582
+ # An array of commands appended to compiled code
583
+ #
584
+ # source://erb//lib/erb/compiler.rb#452
585
+ def post_cmd; end
586
+
587
+ # An array of commands appended to compiled code
588
+ #
589
+ # source://erb//lib/erb/compiler.rb#452
590
+ def post_cmd=(_arg0); end
591
+
592
+ # An array of commands prepended to compiled code
593
+ #
594
+ # source://erb//lib/erb/compiler.rb#449
595
+ def pre_cmd; end
596
+
597
+ # An array of commands prepended to compiled code
598
+ #
599
+ # source://erb//lib/erb/compiler.rb#449
600
+ def pre_cmd=(_arg0); end
601
+
602
+ # source://erb//lib/erb/compiler.rb#398
603
+ def prepare_trim_mode(mode); end
604
+
605
+ # The command to handle text that ends with a newline
606
+ #
607
+ # source://erb//lib/erb/compiler.rb#443
608
+ def put_cmd; end
609
+
610
+ # The command to handle text that ends with a newline
611
+ #
612
+ # source://erb//lib/erb/compiler.rb#443
613
+ def put_cmd=(_arg0); end
614
+
615
+ # Returns the value of attribute trim_mode.
616
+ #
617
+ # source://erb//lib/erb/compiler.rb#440
618
+ def trim_mode; end
619
+
620
+ private
621
+
622
+ # A buffered text in #compile
623
+ #
624
+ # source://erb//lib/erb/compiler.rb#457
625
+ def content; end
626
+
627
+ # A buffered text in #compile
628
+ #
629
+ # source://erb//lib/erb/compiler.rb#457
630
+ def content=(_arg0); end
631
+
632
+ # source://erb//lib/erb/compiler.rb#459
633
+ def detect_magic_comment(s, enc = T.unsafe(nil)); end
634
+
635
+ # :startdoc:
636
+ #
637
+ # source://erb//lib/erb/compiler.rb#485
638
+ def warn_invalid_trim_mode(mode, uplevel:); end
639
+ end
640
+
641
+ # source://erb//lib/erb/compiler.rb#278
642
+ class ERB::Compiler::Buffer
643
+ # @return [Buffer] a new instance of Buffer
644
+ #
645
+ # source://erb//lib/erb/compiler.rb#279
646
+ def initialize(compiler, enc = T.unsafe(nil), frozen = T.unsafe(nil)); end
647
+
648
+ # source://erb//lib/erb/compiler.rb#301
649
+ def close; end
650
+
651
+ # source://erb//lib/erb/compiler.rb#295
652
+ def cr; end
653
+
654
+ # source://erb//lib/erb/compiler.rb#291
655
+ def push(cmd); end
656
+
657
+ # Returns the value of attribute script.
658
+ #
659
+ # source://erb//lib/erb/compiler.rb#289
660
+ def script; end
661
+ end
662
+
663
+ # source://erb//lib/erb/compiler.rb#254
664
+ class ERB::Compiler::ExplicitScanner < ::ERB::Compiler::Scanner
665
+ # source://erb//lib/erb/compiler.rb#255
666
+ def scan; end
667
+ end
668
+
669
+ # source://erb//lib/erb/compiler.rb#74
670
+ class ERB::Compiler::PercentLine
671
+ # @return [PercentLine] a new instance of PercentLine
672
+ #
673
+ # source://erb//lib/erb/compiler.rb#75
674
+ def initialize(str); end
675
+
676
+ # Returns the value of attribute value.
677
+ #
678
+ # source://erb//lib/erb/compiler.rb#78
679
+ def to_s; end
680
+
681
+ # Returns the value of attribute value.
682
+ #
683
+ # source://erb//lib/erb/compiler.rb#78
684
+ def value; end
685
+ end
686
+
687
+ # source://erb//lib/erb/compiler.rb#82
688
+ class ERB::Compiler::Scanner
689
+ # @return [Scanner] a new instance of Scanner
690
+ #
691
+ # source://erb//lib/erb/compiler.rb#108
692
+ def initialize(src, trim_mode, percent); end
693
+
694
+ # Returns the value of attribute etags.
695
+ #
696
+ # source://erb//lib/erb/compiler.rb#115
697
+ def etags; end
698
+
699
+ # source://erb//lib/erb/compiler.rb#117
700
+ def scan; end
701
+
702
+ # Returns the value of attribute stag.
703
+ #
704
+ # source://erb//lib/erb/compiler.rb#114
705
+ def stag; end
706
+
707
+ # Sets the attribute stag
708
+ #
709
+ # @param value the value to set the attribute stag to.
710
+ #
711
+ # source://erb//lib/erb/compiler.rb#114
712
+ def stag=(_arg0); end
713
+
714
+ # Returns the value of attribute stags.
715
+ #
716
+ # source://erb//lib/erb/compiler.rb#115
717
+ def stags; end
718
+
719
+ class << self
720
+ # source://erb//lib/erb/compiler.rb#97
721
+ def default_scanner=(klass); end
722
+
723
+ # source://erb//lib/erb/compiler.rb#101
724
+ def make_scanner(src, trim_mode, percent); end
725
+
726
+ # source://erb//lib/erb/compiler.rb#86
727
+ def regist_scanner(klass, trim_mode, percent); end
728
+
729
+ # source://erb//lib/erb/compiler.rb#86
730
+ def register_scanner(klass, trim_mode, percent); end
731
+ end
732
+ end
733
+
734
+ # source://erb//lib/erb/compiler.rb#107
735
+ ERB::Compiler::Scanner::DEFAULT_ETAGS = T.let(T.unsafe(nil), Array)
736
+
737
+ # source://erb//lib/erb/compiler.rb#106
738
+ ERB::Compiler::Scanner::DEFAULT_STAGS = T.let(T.unsafe(nil), Array)
739
+
740
+ # source://erb//lib/erb/compiler.rb#240
741
+ class ERB::Compiler::SimpleScanner < ::ERB::Compiler::Scanner
742
+ # source://erb//lib/erb/compiler.rb#241
743
+ def scan; end
744
+ end
745
+
746
+ # source://erb//lib/erb/compiler.rb#120
747
+ class ERB::Compiler::TrimScanner < ::ERB::Compiler::Scanner
748
+ # @return [TrimScanner] a new instance of TrimScanner
749
+ #
750
+ # source://erb//lib/erb/compiler.rb#121
751
+ def initialize(src, trim_mode, percent); end
752
+
753
+ # source://erb//lib/erb/compiler.rb#210
754
+ def explicit_trim_line(line); end
755
+
756
+ # @return [Boolean]
757
+ #
758
+ # source://erb//lib/erb/compiler.rb#229
759
+ def is_erb_stag?(s); end
760
+
761
+ # source://erb//lib/erb/compiler.rb#152
762
+ def percent_line(line, &block); end
763
+
764
+ # source://erb//lib/erb/compiler.rb#140
765
+ def scan(&block); end
766
+
767
+ # source://erb//lib/erb/compiler.rb#165
768
+ def scan_line(line); end
769
+
770
+ # source://erb//lib/erb/compiler.rb#174
771
+ def trim_line1(line); end
772
+
773
+ # source://erb//lib/erb/compiler.rb#188
774
+ def trim_line2(line); end
775
+ end
776
+
777
+ # :stopdoc:
778
+ #
779
+ # source://erb//lib/erb/compiler.rb#476
780
+ ERB::Compiler::WARNING_UPLEVEL = T.let(T.unsafe(nil), Integer)
781
+
782
+ # ERB::DefMethod
783
+ #
784
+ # Utility module to define eRuby script as instance method.
785
+ #
786
+ # === Example
787
+ #
788
+ # example.rhtml:
789
+ # <% for item in @items %>
790
+ # <b><%= item %></b>
791
+ # <% end %>
792
+ #
793
+ # example.rb:
794
+ # require 'erb'
795
+ # class MyClass
796
+ # extend ERB::DefMethod
797
+ # def_erb_method('render()', 'example.rhtml')
798
+ # def initialize(items)
799
+ # @items = items
800
+ # end
801
+ # end
802
+ # print MyClass.new([10,20,30]).render()
803
+ #
804
+ # result:
805
+ #
806
+ # <b>10</b>
807
+ #
808
+ # <b>20</b>
809
+ #
810
+ # <b>30</b>
811
+ #
812
+ # source://erb//lib/erb/def_method.rb#33
813
+ module ERB::DefMethod
814
+ private
815
+
816
+ # define _methodname_ as instance method of current module, using ERB
817
+ # object or eRuby file
818
+ #
819
+ # source://erb//lib/erb/def_method.rb#36
820
+ def def_erb_method(methodname, erb_or_fname); end
821
+
822
+ class << self
823
+ # define _methodname_ as instance method of current module, using ERB
824
+ # object or eRuby file
825
+ #
826
+ # source://erb//lib/erb/def_method.rb#36
827
+ def def_erb_method(methodname, erb_or_fname); end
828
+ end
829
+ end
830
+
831
+ module ERB::Escape
832
+ private
833
+
834
+ def html_escape(_arg0); end
835
+
836
+ class << self
837
+ def html_escape(_arg0); end
838
+ end
839
+ end
840
+
841
+ # source://erb//lib/erb.rb#355
842
+ ERB::NOT_GIVEN = T.let(T.unsafe(nil), Object)
843
+
844
+ # ERB::Util
845
+ #
846
+ # A utility module for conversion routines, often handy in HTML generation.
847
+ #
848
+ # source://erb//lib/erb/util.rb#32
849
+ module ERB::Util
850
+ include ::ERB::Escape
851
+
852
+ private
853
+
854
+ # cgi.gem <= v0.3.2
855
+ #
856
+ # source://erb//lib/erb/util.rb#63
857
+ def u(s); end
858
+
859
+ # cgi.gem <= v0.3.2
860
+ #
861
+ # source://erb//lib/erb/util.rb#63
862
+ def url_encode(s); end
863
+
864
+ class << self
865
+ # cgi.gem <= v0.3.2
866
+ #
867
+ # source://erb//lib/erb/util.rb#63
868
+ def u(s); end
869
+
870
+ # cgi.gem <= v0.3.2
871
+ #
872
+ # source://erb//lib/erb/util.rb#63
873
+ def url_encode(s); end
874
+ end
875
+ end
876
+
877
+ # source://erb//lib/erb/version.rb#3
878
+ ERB::VERSION = T.let(T.unsafe(nil), String)