playoffs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.editorconfig +8 -0
  4. data/.github/workflows/ci.yaml +29 -0
  5. data/.gitignore +8 -0
  6. data/.rubocop.yml +34 -0
  7. data/.tool-versions +1 -0
  8. data/.vscode/settings.json +5 -0
  9. data/CHANGELOG.md +3 -0
  10. data/CODE_OF_CONDUCT.md +73 -0
  11. data/Gemfile +5 -0
  12. data/Guardfile +17 -0
  13. data/LICENSE +5 -0
  14. data/README.md +245 -0
  15. data/Rakefile +11 -0
  16. data/bin/_guard-core +27 -0
  17. data/bin/bundle +109 -0
  18. data/bin/bundle-audit +27 -0
  19. data/bin/bundler-audit +27 -0
  20. data/bin/coderay +27 -0
  21. data/bin/console +11 -0
  22. data/bin/guard +27 -0
  23. data/bin/htmldiff +27 -0
  24. data/bin/ldiff +27 -0
  25. data/bin/listen +27 -0
  26. data/bin/playoffs +27 -0
  27. data/bin/pry +27 -0
  28. data/bin/racc +27 -0
  29. data/bin/rake +27 -0
  30. data/bin/rspec +27 -0
  31. data/bin/rubocop +27 -0
  32. data/bin/ruby-parse +27 -0
  33. data/bin/ruby-rewrite +27 -0
  34. data/bin/spoom +27 -0
  35. data/bin/srb +27 -0
  36. data/bin/srb-rbi +27 -0
  37. data/bin/tapioca +27 -0
  38. data/bin/thor +27 -0
  39. data/bin/yard +27 -0
  40. data/bin/yardoc +27 -0
  41. data/bin/yri +27 -0
  42. data/exe/playoffs +7 -0
  43. data/lib/playoffs/basketball.rb +120 -0
  44. data/lib/playoffs/best_of.rb +38 -0
  45. data/lib/playoffs/cli.rb +201 -0
  46. data/lib/playoffs/contestant.rb +8 -0
  47. data/lib/playoffs/round.rb +42 -0
  48. data/lib/playoffs/series.rb +167 -0
  49. data/lib/playoffs/team.rb +7 -0
  50. data/lib/playoffs/tournament/bracketable.rb +93 -0
  51. data/lib/playoffs/tournament/roundable.rb +53 -0
  52. data/lib/playoffs/tournament.rb +61 -0
  53. data/lib/playoffs/version.rb +6 -0
  54. data/lib/playoffs.rb +26 -0
  55. data/playoffs.gemspec +49 -0
  56. data/sorbet/config +4 -0
  57. data/sorbet/rbi/annotations/.gitattributes +1 -0
  58. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  59. data/sorbet/rbi/gems/.gitattributes +1 -0
  60. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  61. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  62. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +309 -0
  63. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  64. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  65. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  66. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  67. data/sorbet/rbi/gems/ffi@1.16.3.rbi +9 -0
  68. data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
  69. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +67 -0
  70. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +563 -0
  71. data/sorbet/rbi/gems/guard@2.18.1.rbi +9 -0
  72. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  73. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  74. data/sorbet/rbi/gems/listen@3.9.0.rbi +9 -0
  75. data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +9 -0
  76. data/sorbet/rbi/gems/method_source@1.1.0.rbi +304 -0
  77. data/sorbet/rbi/gems/nenv@0.3.0.rbi +9 -0
  78. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  79. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +9 -0
  80. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  81. data/sorbet/rbi/gems/parser@3.3.1.0.rbi +7238 -0
  82. data/sorbet/rbi/gems/primitive@1.0.0.rbi +58 -0
  83. data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
  84. data/sorbet/rbi/gems/pry@0.14.2.rbi +10069 -0
  85. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  86. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  87. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  88. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
  89. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +9 -0
  90. data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
  91. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  92. data/sorbet/rbi/gems/rexml@3.2.8.rbi +4794 -0
  93. data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10874 -0
  94. data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8154 -0
  95. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  96. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  97. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  98. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7159 -0
  99. data/sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi +1208 -0
  100. data/sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi +928 -0
  101. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  102. data/sorbet/rbi/gems/rubocop-rspec@2.29.2.rbi +8247 -0
  103. data/sorbet/rbi/gems/rubocop-rspec_rails@2.28.3.rbi +911 -0
  104. data/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +1607 -0
  105. data/sorbet/rbi/gems/rubocop@1.63.5.rbi +57788 -0
  106. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  107. data/sorbet/rbi/gems/shellany@0.0.1.rbi +9 -0
  108. data/sorbet/rbi/gems/simplecov-console@0.9.1.rbi +103 -0
  109. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  110. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  111. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  112. data/sorbet/rbi/gems/sorbet-runtime-stub@0.2.0.rbi +8 -0
  113. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
  114. data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
  115. data/sorbet/rbi/gems/tapioca@0.14.2.rbi +3539 -0
  116. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +9 -0
  117. data/sorbet/rbi/gems/thor@1.3.1.rbi +4318 -0
  118. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  119. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  120. data/sorbet/rbi/gems/yard@0.9.36.rbi +18085 -0
  121. data/sorbet/tapioca/config.yml +13 -0
  122. data/sorbet/tapioca/require.rb +4 -0
  123. metadata +383 -0
@@ -0,0 +1,377 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `docile` gem.
5
+ # Please instead update this file by running `bin/tapioca gem docile`.
6
+
7
+
8
+ # Docile keeps your Ruby DSLs tame and well-behaved.
9
+ #
10
+ # source://docile//lib/docile/version.rb#3
11
+ module Docile
12
+ extend ::Docile::Execution
13
+
14
+ private
15
+
16
+ # Execute a block in the context of an object whose methods represent the
17
+ # commands in a DSL.
18
+ #
19
+ # Use this method to execute an *imperative* DSL, which means that:
20
+ #
21
+ # 1. Each command mutates the state of the DSL context object
22
+ # 2. The return value of each command is ignored
23
+ # 3. The final return value is the original context object
24
+ #
25
+ # @example Use a String as a DSL
26
+ # Docile.dsl_eval("Hello, world!") do
27
+ # reverse!
28
+ # upcase!
29
+ # end
30
+ # #=> "!DLROW ,OLLEH"
31
+ # @example Use an Array as a DSL
32
+ # Docile.dsl_eval([]) do
33
+ # push 1
34
+ # push 2
35
+ # pop
36
+ # push 3
37
+ # end
38
+ # #=> [1, 3]
39
+ # @note Use with an *imperative* DSL (commands modify the context object)
40
+ # @param dsl [Object] context object whose methods make up the DSL
41
+ # @param args [Array] arguments to be passed to the block
42
+ # @param block [Proc] the block of DSL commands to be executed against the
43
+ # `dsl` context object
44
+ # @return [Object] the `dsl` context object after executing the block
45
+ #
46
+ # source://docile//lib/docile.rb#45
47
+ def dsl_eval(dsl, *args, **_arg2, &block); end
48
+
49
+ # Execute a block in the context of an immutable object whose methods,
50
+ # and the methods of their return values, represent the commands in a DSL.
51
+ #
52
+ # Use this method to execute a *functional* DSL, which means that:
53
+ #
54
+ # 1. The original DSL context object is never mutated
55
+ # 2. Each command returns the next DSL context object
56
+ # 3. The final return value is the value returned by the last command
57
+ #
58
+ # @example Use a frozen String as a DSL
59
+ # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
60
+ # reverse
61
+ # upcase
62
+ # end
63
+ # #=> "!ELBATUMMI M'I"
64
+ # @example Use a Float as a DSL
65
+ # Docile.dsl_eval_immutable(84.5) do
66
+ # fdiv(2)
67
+ # floor
68
+ # end
69
+ # #=> 42
70
+ # @note Use with a *functional* DSL (commands return successor
71
+ # context objects)
72
+ # @param dsl [Object] immutable context object whose methods make up the
73
+ # initial DSL
74
+ # @param args [Array] arguments to be passed to the block
75
+ # @param block [Proc] the block of DSL commands to be executed against the
76
+ # `dsl` context object and successor return values
77
+ # @return [Object] the return value of the final command in the block
78
+ #
79
+ # source://docile//lib/docile.rb#128
80
+ def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
81
+
82
+ # Execute a block in the context of an object whose methods represent the
83
+ # commands in a DSL, and return *the block's return value*.
84
+ #
85
+ # Use this method to execute an *imperative* DSL, which means that:
86
+ #
87
+ # 1. Each command mutates the state of the DSL context object
88
+ # 2. The return value of each command is ignored
89
+ # 3. The final return value is the original context object
90
+ #
91
+ # @example Use a String as a DSL
92
+ # Docile.dsl_eval_with_block_return("Hello, world!") do
93
+ # reverse!
94
+ # upcase!
95
+ # first
96
+ # end
97
+ # #=> "!"
98
+ # @example Use an Array as a DSL
99
+ # Docile.dsl_eval_with_block_return([]) do
100
+ # push "a"
101
+ # push "b"
102
+ # pop
103
+ # push "c"
104
+ # length
105
+ # end
106
+ # #=> 2
107
+ # @note Use with an *imperative* DSL (commands modify the context object)
108
+ # @param dsl [Object] context object whose methods make up the DSL
109
+ # @param args [Array] arguments to be passed to the block
110
+ # @param block [Proc] the block of DSL commands to be executed against the
111
+ # `dsl` context object
112
+ # @return [Object] the return value from executing the block
113
+ #
114
+ # source://docile//lib/docile.rb#87
115
+ def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
116
+
117
+ class << self
118
+ # Execute a block in the context of an object whose methods represent the
119
+ # commands in a DSL.
120
+ #
121
+ # Use this method to execute an *imperative* DSL, which means that:
122
+ #
123
+ # 1. Each command mutates the state of the DSL context object
124
+ # 2. The return value of each command is ignored
125
+ # 3. The final return value is the original context object
126
+ #
127
+ # @example Use a String as a DSL
128
+ # Docile.dsl_eval("Hello, world!") do
129
+ # reverse!
130
+ # upcase!
131
+ # end
132
+ # #=> "!DLROW ,OLLEH"
133
+ # @example Use an Array as a DSL
134
+ # Docile.dsl_eval([]) do
135
+ # push 1
136
+ # push 2
137
+ # pop
138
+ # push 3
139
+ # end
140
+ # #=> [1, 3]
141
+ # @note Use with an *imperative* DSL (commands modify the context object)
142
+ # @param dsl [Object] context object whose methods make up the DSL
143
+ # @param args [Array] arguments to be passed to the block
144
+ # @param block [Proc] the block of DSL commands to be executed against the
145
+ # `dsl` context object
146
+ # @return [Object] the `dsl` context object after executing the block
147
+ #
148
+ # source://docile//lib/docile.rb#45
149
+ def dsl_eval(dsl, *args, **_arg2, &block); end
150
+
151
+ # Execute a block in the context of an immutable object whose methods,
152
+ # and the methods of their return values, represent the commands in a DSL.
153
+ #
154
+ # Use this method to execute a *functional* DSL, which means that:
155
+ #
156
+ # 1. The original DSL context object is never mutated
157
+ # 2. Each command returns the next DSL context object
158
+ # 3. The final return value is the value returned by the last command
159
+ #
160
+ # @example Use a frozen String as a DSL
161
+ # Docile.dsl_eval_immutable("I'm immutable!".freeze) do
162
+ # reverse
163
+ # upcase
164
+ # end
165
+ # #=> "!ELBATUMMI M'I"
166
+ # @example Use a Float as a DSL
167
+ # Docile.dsl_eval_immutable(84.5) do
168
+ # fdiv(2)
169
+ # floor
170
+ # end
171
+ # #=> 42
172
+ # @note Use with a *functional* DSL (commands return successor
173
+ # context objects)
174
+ # @param dsl [Object] immutable context object whose methods make up the
175
+ # initial DSL
176
+ # @param args [Array] arguments to be passed to the block
177
+ # @param block [Proc] the block of DSL commands to be executed against the
178
+ # `dsl` context object and successor return values
179
+ # @return [Object] the return value of the final command in the block
180
+ #
181
+ # source://docile//lib/docile.rb#128
182
+ def dsl_eval_immutable(dsl, *args, **_arg2, &block); end
183
+
184
+ # Execute a block in the context of an object whose methods represent the
185
+ # commands in a DSL, and return *the block's return value*.
186
+ #
187
+ # Use this method to execute an *imperative* DSL, which means that:
188
+ #
189
+ # 1. Each command mutates the state of the DSL context object
190
+ # 2. The return value of each command is ignored
191
+ # 3. The final return value is the original context object
192
+ #
193
+ # @example Use a String as a DSL
194
+ # Docile.dsl_eval_with_block_return("Hello, world!") do
195
+ # reverse!
196
+ # upcase!
197
+ # first
198
+ # end
199
+ # #=> "!"
200
+ # @example Use an Array as a DSL
201
+ # Docile.dsl_eval_with_block_return([]) do
202
+ # push "a"
203
+ # push "b"
204
+ # pop
205
+ # push "c"
206
+ # length
207
+ # end
208
+ # #=> 2
209
+ # @note Use with an *imperative* DSL (commands modify the context object)
210
+ # @param dsl [Object] context object whose methods make up the DSL
211
+ # @param args [Array] arguments to be passed to the block
212
+ # @param block [Proc] the block of DSL commands to be executed against the
213
+ # `dsl` context object
214
+ # @return [Object] the return value from executing the block
215
+ #
216
+ # source://docile//lib/docile.rb#87
217
+ def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end
218
+ end
219
+ end
220
+
221
+ # This is used to remove entries pointing to Docile's source files
222
+ # from {Exception#backtrace} and {Exception#backtrace_locations}.
223
+ #
224
+ # If {NoMethodError} is caught then the exception object will be extended
225
+ # by this module to add filter functionalities.
226
+ #
227
+ # @api private
228
+ #
229
+ # source://docile//lib/docile/backtrace_filter.rb#11
230
+ module Docile::BacktraceFilter
231
+ # @api private
232
+ #
233
+ # source://docile//lib/docile/backtrace_filter.rb#14
234
+ def backtrace; end
235
+
236
+ # @api private
237
+ #
238
+ # source://docile//lib/docile/backtrace_filter.rb#19
239
+ def backtrace_locations; end
240
+ end
241
+
242
+ # @api private
243
+ #
244
+ # source://docile//lib/docile/backtrace_filter.rb#12
245
+ Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp)
246
+
247
+ # Operates in the same manner as {FallbackContextProxy}, but replacing
248
+ # the primary `receiver` object with the result of each proxied method.
249
+ #
250
+ # This is useful for implementing DSL evaluation for immutable context
251
+ # objects.
252
+ #
253
+ #
254
+ # @api private
255
+ # @see Docile.dsl_eval_immutable
256
+ #
257
+ # source://docile//lib/docile/chaining_fallback_context_proxy.rb#17
258
+ class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy
259
+ # Proxy methods as in {FallbackContextProxy#method_missing}, replacing
260
+ # `receiver` with the returned value.
261
+ #
262
+ # @api private
263
+ #
264
+ # source://docile//lib/docile/chaining_fallback_context_proxy.rb#20
265
+ def method_missing(method, *args, **_arg2, &block); end
266
+ end
267
+
268
+ # A namespace for functions relating to the execution of a block against a
269
+ # proxy object.
270
+ #
271
+ # @api private
272
+ #
273
+ # source://docile//lib/docile/execution.rb#8
274
+ module Docile::Execution
275
+ private
276
+
277
+ # Execute a block in the context of an object whose methods represent the
278
+ # commands in a DSL, using a specific proxy class.
279
+ #
280
+ # @api private
281
+ # @param dsl [Object] context object whose methods make up the
282
+ # (initial) DSL
283
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
284
+ # @param args [Array] arguments to be passed to the block
285
+ # @param block [Proc] the block of DSL commands to be executed
286
+ # @return [Object] the return value of the block
287
+ #
288
+ # source://docile//lib/docile/execution.rb#19
289
+ def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
290
+
291
+ class << self
292
+ # Execute a block in the context of an object whose methods represent the
293
+ # commands in a DSL, using a specific proxy class.
294
+ #
295
+ # @api private
296
+ # @param dsl [Object] context object whose methods make up the
297
+ # (initial) DSL
298
+ # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context
299
+ # @param args [Array] arguments to be passed to the block
300
+ # @param block [Proc] the block of DSL commands to be executed
301
+ # @return [Object] the return value of the block
302
+ #
303
+ # source://docile//lib/docile/execution.rb#19
304
+ def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end
305
+ end
306
+ end
307
+
308
+ # A proxy object with a primary receiver as well as a secondary
309
+ # fallback receiver.
310
+ #
311
+ # Will attempt to forward all method calls first to the primary receiver,
312
+ # and then to the fallback receiver if the primary does not handle that
313
+ # method.
314
+ #
315
+ # This is useful for implementing DSL evaluation in the context of an object.
316
+ #
317
+ #
318
+ # @api private
319
+ # @see Docile.dsl_eval
320
+ #
321
+ # source://docile//lib/docile/fallback_context_proxy.rb#20
322
+ class Docile::FallbackContextProxy
323
+ # @api private
324
+ # @param receiver [Object] the primary proxy target to which all methods
325
+ # initially will be forwarded
326
+ # @param fallback [Object] the fallback proxy target to which any methods
327
+ # not handled by `receiver` will be forwarded
328
+ # @return [FallbackContextProxy] a new instance of FallbackContextProxy
329
+ #
330
+ # source://docile//lib/docile/fallback_context_proxy.rb#46
331
+ def initialize(receiver, fallback); end
332
+
333
+ # @api private
334
+ # @return [Array<Symbol>] Instance variable names, excluding
335
+ # {NON_PROXIED_INSTANCE_VARIABLES}
336
+ #
337
+ # source://docile//lib/docile/fallback_context_proxy.rb#85
338
+ def instance_variables; end
339
+
340
+ # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver`
341
+ # and then to `fallback` if not found.
342
+ #
343
+ # @api private
344
+ #
345
+ # source://docile//lib/docile/fallback_context_proxy.rb#91
346
+ def method_missing(method, *args, **_arg2, &block); end
347
+ end
348
+
349
+ # The set of methods which will **not** fallback from the block's context
350
+ # to the dsl object.
351
+ #
352
+ # @api private
353
+ #
354
+ # source://docile//lib/docile/fallback_context_proxy.rb#30
355
+ Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set)
356
+
357
+ # The set of instance variables which are local to this object and hidden.
358
+ # All other instance variables will be copied in and out of this object
359
+ # from the scope in which this proxy was created.
360
+ #
361
+ # @api private
362
+ #
363
+ # source://docile//lib/docile/fallback_context_proxy.rb#35
364
+ Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set)
365
+
366
+ # The set of methods which will **not** be proxied, but instead answered
367
+ # by this object directly.
368
+ #
369
+ # @api private
370
+ #
371
+ # source://docile//lib/docile/fallback_context_proxy.rb#23
372
+ Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set)
373
+
374
+ # The current version of this library
375
+ #
376
+ # source://docile//lib/docile/version.rb#5
377
+ Docile::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,145 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `erubi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem erubi`.
6
+
7
+ # source://erubi//lib/erubi.rb#3
8
+ module Erubi
9
+ class << self
10
+ def h(_arg0); end
11
+ end
12
+ end
13
+
14
+ # source://erubi//lib/erubi.rb#54
15
+ class Erubi::Engine
16
+ # Initialize a new Erubi::Engine. Options:
17
+ # +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
18
+ # +:bufvar+ :: The variable name to use for the buffer variable, as a string.
19
+ # +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
20
+ # performance, but can cause issues when the buffer variable is reassigned during
21
+ # template rendering (default +false+).
22
+ # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
23
+ # +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
24
+ # +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
25
+ # +:escape_html+ :: Same as +:escape+, with lower priority.
26
+ # +:filename+ :: The filename for the template.
27
+ # the resulting source code. Note this may cause problems if you are wrapping the resulting
28
+ # source code in other code, because the magic comment only has an effect at the beginning of
29
+ # the file, and having the magic comment later in the file can trigger warnings.
30
+ # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
31
+ # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
32
+ # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
33
+ # in order to improve performance.
34
+ # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
35
+ # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
36
+ # +:outvar+ :: Same as +:bufvar+, with lower priority.
37
+ # +:postamble+ :: The postamble for the template, by default returns the resulting source code.
38
+ # +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
39
+ # +:regexp+ :: The regexp to use for scanning.
40
+ # +:src+ :: The initial value to use for the source code, an empty string by default.
41
+ # +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
42
+ #
43
+ # @return [Engine] a new instance of Engine
44
+ #
45
+ # source://erubi//lib/erubi.rb#94
46
+ def initialize(input, properties = T.unsafe(nil)); end
47
+
48
+ # The variable name used for the buffer variable.
49
+ #
50
+ # source://erubi//lib/erubi.rb#65
51
+ def bufvar; end
52
+
53
+ # The filename of the template, if one was given.
54
+ #
55
+ # source://erubi//lib/erubi.rb#62
56
+ def filename; end
57
+
58
+ # The frozen ruby source code generated from the template, which can be evaled.
59
+ #
60
+ # source://erubi//lib/erubi.rb#59
61
+ def src; end
62
+
63
+ private
64
+
65
+ # Add ruby code to the template
66
+ #
67
+ # source://erubi//lib/erubi.rb#226
68
+ def add_code(code); end
69
+
70
+ # Add the given ruby expression result to the template,
71
+ # escaping it based on the indicator given and escape flag.
72
+ #
73
+ # source://erubi//lib/erubi.rb#235
74
+ def add_expression(indicator, code); end
75
+
76
+ # Add the result of Ruby expression to the template
77
+ #
78
+ # source://erubi//lib/erubi.rb#244
79
+ def add_expression_result(code); end
80
+
81
+ # Add the escaped result of Ruby expression to the template
82
+ #
83
+ # source://erubi//lib/erubi.rb#249
84
+ def add_expression_result_escaped(code); end
85
+
86
+ # Add the given postamble to the src. Can be overridden in subclasses
87
+ # to make additional changes to src that depend on the current state.
88
+ #
89
+ # source://erubi//lib/erubi.rb#255
90
+ def add_postamble(postamble); end
91
+
92
+ # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
93
+ # Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
94
+ #
95
+ # source://erubi//lib/erubi.rb#213
96
+ def add_text(text); end
97
+
98
+ # Raise an exception, as the base engine class does not support handling other indicators.
99
+ #
100
+ # @raise [ArgumentError]
101
+ #
102
+ # source://erubi//lib/erubi.rb#261
103
+ def handle(indicator, code, tailch, rspace, lspace); end
104
+
105
+ # Make sure that any current expression has been terminated.
106
+ # The default is to terminate all expressions, but when
107
+ # the chain_appends option is used, expressions may not be
108
+ # terminated.
109
+ #
110
+ # source://erubi//lib/erubi.rb#289
111
+ def terminate_expression; end
112
+
113
+ # Make sure the buffer variable is the target of the next append
114
+ # before yielding to the block. Mark that the buffer is the target
115
+ # of the next append after the block executes.
116
+ #
117
+ # This method should only be called if the block will result in
118
+ # code where << will append to the bufvar.
119
+ #
120
+ # source://erubi//lib/erubi.rb#271
121
+ def with_buffer; end
122
+ end
123
+
124
+ # The default regular expression used for scanning.
125
+ #
126
+ # source://erubi//lib/erubi.rb#56
127
+ Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
128
+
129
+ # source://erubi//lib/erubi.rb#17
130
+ Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
131
+
132
+ # source://erubi//lib/erubi.rb#15
133
+ Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
134
+
135
+ # source://erubi//lib/erubi.rb#8
136
+ Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
137
+
138
+ # source://erubi//lib/erubi.rb#9
139
+ Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
140
+
141
+ # source://erubi//lib/erubi.rb#16
142
+ Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
143
+
144
+ # source://erubi//lib/erubi.rb#4
145
+ Erubi::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `ffi` gem.
5
+ # Please instead update this file by running `bin/tapioca gem ffi`.
6
+
7
+
8
+ # THIS IS AN EMPTY RBI FILE.
9
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `formatador` gem.
5
+ # Please instead update this file by running `bin/tapioca gem formatador`.
6
+
7
+
8
+ # THIS IS AN EMPTY RBI FILE.
9
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,67 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `guard-compat` gem.
5
+ # Please instead update this file by running `bin/tapioca gem guard-compat`.
6
+
7
+
8
+ # Provided empty definition so requiring the plugin without Guard won't crash
9
+ # (e.g. when added to a Gemfile without `require: false`)
10
+ #
11
+ # source://guard-compat//lib/guard/compat/plugin.rb#5
12
+ module Guard; end
13
+
14
+ # source://guard-compat//lib/guard/compat/plugin.rb#24
15
+ module Guard::Compat
16
+ class << self
17
+ # TODO: this is just a temporary workaround to allow plugins
18
+ # to use watcher patterns in run_all
19
+ #
20
+ # source://guard-compat//lib/guard/compat/plugin.rb#27
21
+ def matching_files(plugin, files); end
22
+
23
+ # source://guard-compat//lib/guard/compat/plugin.rb#39
24
+ def watched_directories; end
25
+ end
26
+ end
27
+
28
+ # source://guard-compat//lib/guard/compat/plugin.rb#54
29
+ module Guard::Compat::UI
30
+ class << self
31
+ # source://guard-compat//lib/guard/compat/plugin.rb#55
32
+ def color(text, *colors); end
33
+
34
+ # @return [Boolean]
35
+ #
36
+ # source://guard-compat//lib/guard/compat/plugin.rb#63
37
+ def color_enabled?; end
38
+
39
+ # source://guard-compat//lib/guard/compat/plugin.rb#95
40
+ def debug(message, options = T.unsafe(nil)); end
41
+
42
+ # source://guard-compat//lib/guard/compat/plugin.rb#103
43
+ def deprecation(message, options = T.unsafe(nil)); end
44
+
45
+ # source://guard-compat//lib/guard/compat/plugin.rb#87
46
+ def error(message, options = T.unsafe(nil)); end
47
+
48
+ # source://guard-compat//lib/guard/compat/plugin.rb#71
49
+ def info(message, options = T.unsafe(nil)); end
50
+
51
+ # source://guard-compat//lib/guard/compat/plugin.rb#111
52
+ def notify(msg, options = T.unsafe(nil)); end
53
+
54
+ # source://guard-compat//lib/guard/compat/plugin.rb#79
55
+ def warning(message, options = T.unsafe(nil)); end
56
+ end
57
+ end
58
+
59
+ # Monkey patch Plugin to just keep the interface
60
+ #
61
+ # source://guard-compat//lib/guard/compat/plugin.rb#13
62
+ class Guard::Plugin
63
+ # @return [Plugin] a new instance of Plugin
64
+ #
65
+ # source://guard-compat//lib/guard/compat/plugin.rb#14
66
+ def initialize(_options = T.unsafe(nil)); end
67
+ end