packwerk-haml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +75 -0
- data/Gemfile +22 -0
- data/Gemfile.lock +190 -0
- data/LICENSE.txt +21 -0
- data/README.md +32 -0
- data/Rakefile +16 -0
- data/lib/packwerk_haml/parser.rb +64 -0
- data/lib/packwerk_haml/version.rb +6 -0
- data/lib/packwerk_haml.rb +8 -0
- data/packwerk-haml.gemspec +40 -0
- data/sig/packwerk/haml.rbs +4 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/actionview.rbi +75 -0
- data/sorbet/rbi/annotations/activesupport.rbi +136 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/actionview@7.1.1.rbi +15004 -0
- data/sorbet/rbi/gems/activesupport@7.1.1.rbi +18784 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.1.1.rbi +172 -0
- data/sorbet/rbi/gems/better_html@2.0.2.rbi +529 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.4.rbi +77 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/drb@2.1.1.rbi +1313 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/haml@6.2.3.rbi +1619 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +2325 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/loofah@2.21.4.rbi +1021 -0
- data/sorbet/rbi/gems/m@1.6.2.rbi +257 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest-focus@1.4.0.rbi +91 -0
- data/sorbet/rbi/gems/minitest@5.20.0.rbi +1509 -0
- data/sorbet/rbi/gems/mutex_m@0.1.2.rbi +91 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.15.4.rbi +7317 -0
- data/sorbet/rbi/gems/packwerk@3.1.0-752d37add96b9f4bf28492d7db152f6523b1d29c.rbi +2370 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/racc@1.7.1.rbi +161 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +8 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +716 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3042 -0
- data/sorbet/rbi/gems/rbi@0.1.1.rbi +2926 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3749 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +7075 -0
- data/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi +3208 -0
- data/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.4.rbi +1442 -0
- data/sorbet/rbi/gems/rubocop@1.57.0.rbi +56753 -0
- data/sorbet/rbi/gems/ruby-lsp@0.2.4.rbi +11 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.11.9.rbi +3498 -0
- data/sorbet/rbi/gems/temple@0.10.3.rbi +1738 -0
- data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
- data/sorbet/rbi/gems/tilt@2.3.0.rbi +925 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/rbi/gems/yarp@0.13.0.rbi +21646 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.12.rbi +997 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +5 -0
- metadata +167 -0
@@ -0,0 +1,1738 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `temple` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem temple`.
|
6
|
+
|
7
|
+
# source://temple//lib/temple/version.rb#2
|
8
|
+
module Temple; end
|
9
|
+
|
10
|
+
# ERB example implementation
|
11
|
+
#
|
12
|
+
# Example usage:
|
13
|
+
# Temple::ERB::Template.new { "<%= 'Hello, world!' %>" }.render
|
14
|
+
#
|
15
|
+
# source://temple//lib/temple.rb#29
|
16
|
+
module Temple::ERB; end
|
17
|
+
|
18
|
+
# Example ERB engine implementation
|
19
|
+
#
|
20
|
+
# @api public
|
21
|
+
#
|
22
|
+
# source://temple//lib/temple/erb/engine.rb#7
|
23
|
+
class Temple::ERB::Engine < ::Temple::Engine; end
|
24
|
+
|
25
|
+
# Example ERB parser
|
26
|
+
#
|
27
|
+
# @api public
|
28
|
+
#
|
29
|
+
# source://temple//lib/temple/erb/parser.rb#7
|
30
|
+
class Temple::ERB::Parser < ::Temple::Parser
|
31
|
+
# @api public
|
32
|
+
#
|
33
|
+
# source://temple//lib/temple/erb/parser.rb#10
|
34
|
+
def call(input); end
|
35
|
+
end
|
36
|
+
|
37
|
+
# @api public
|
38
|
+
#
|
39
|
+
# source://temple//lib/temple/erb/parser.rb#8
|
40
|
+
Temple::ERB::Parser::ERB_PATTERN = T.let(T.unsafe(nil), Regexp)
|
41
|
+
|
42
|
+
# ERB Template class
|
43
|
+
#
|
44
|
+
# source://temple//lib/temple/erb/template.rb#0
|
45
|
+
class Temple::ERB::Template < ::Temple::Templates::Tilt; end
|
46
|
+
|
47
|
+
# ERB trimming like in erubis
|
48
|
+
# Deletes spaces around '<% %>' and leave spaces around '<%= %>'.
|
49
|
+
#
|
50
|
+
# @api public
|
51
|
+
#
|
52
|
+
# source://temple//lib/temple/erb/trimming.rb#7
|
53
|
+
class Temple::ERB::Trimming < ::Temple::Filter
|
54
|
+
# @api public
|
55
|
+
#
|
56
|
+
# source://temple//lib/temple/erb/trimming.rb#10
|
57
|
+
def on_multi(*exps); end
|
58
|
+
end
|
59
|
+
|
60
|
+
# An engine is simply a chain of compilers (that often includes a parser,
|
61
|
+
# some filters and a generator).
|
62
|
+
#
|
63
|
+
# class MyEngine < Temple::Engine
|
64
|
+
# # First run MyParser, passing the :strict option
|
65
|
+
# use MyParser, :strict
|
66
|
+
#
|
67
|
+
# # Then a custom filter
|
68
|
+
# use MyFilter
|
69
|
+
#
|
70
|
+
# # Then some general optimizations filters
|
71
|
+
# filter :MultiFlattener
|
72
|
+
# filter :StaticMerger
|
73
|
+
# filter :DynamicInliner
|
74
|
+
#
|
75
|
+
# # Finally the generator
|
76
|
+
# generator :ArrayBuffer, :buffer
|
77
|
+
# end
|
78
|
+
#
|
79
|
+
# class SpecialEngine < MyEngine
|
80
|
+
# append MyCodeOptimizer
|
81
|
+
# before :ArrayBuffer, Temple::Filters::Validator
|
82
|
+
# replace :ArrayBuffer, Temple::Generators::RailsOutputBuffer
|
83
|
+
# end
|
84
|
+
#
|
85
|
+
# engine = MyEngine.new(strict: "For MyParser")
|
86
|
+
# engine.call(something)
|
87
|
+
#
|
88
|
+
# @api public
|
89
|
+
#
|
90
|
+
# source://temple//lib/temple/engine.rb#32
|
91
|
+
class Temple::Engine
|
92
|
+
include ::Temple::Mixins::Options
|
93
|
+
include ::Temple::Mixins::EngineDSL
|
94
|
+
extend ::Temple::Mixins::ClassOptions
|
95
|
+
extend ::Temple::Mixins::ThreadOptions
|
96
|
+
extend ::Temple::Mixins::EngineDSL
|
97
|
+
|
98
|
+
# @api public
|
99
|
+
# @return [Engine] a new instance of Engine
|
100
|
+
#
|
101
|
+
# source://temple//lib/temple/engine.rb#45
|
102
|
+
def initialize(opts = T.unsafe(nil)); end
|
103
|
+
|
104
|
+
# @api public
|
105
|
+
#
|
106
|
+
# source://temple//lib/temple/engine.rb#50
|
107
|
+
def call(input); end
|
108
|
+
|
109
|
+
# @api public
|
110
|
+
#
|
111
|
+
# source://temple//lib/temple/engine.rb#39
|
112
|
+
def chain; end
|
113
|
+
|
114
|
+
protected
|
115
|
+
|
116
|
+
# @api public
|
117
|
+
#
|
118
|
+
# source://temple//lib/temple/engine.rb#60
|
119
|
+
def call_chain; end
|
120
|
+
|
121
|
+
# @api public
|
122
|
+
#
|
123
|
+
# source://temple//lib/temple/engine.rb#56
|
124
|
+
def chain_modified!; end
|
125
|
+
|
126
|
+
class << self
|
127
|
+
# @api public
|
128
|
+
#
|
129
|
+
# source://temple//lib/temple/engine.rb#41
|
130
|
+
def chain; end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Temple base filter
|
135
|
+
#
|
136
|
+
# @api public
|
137
|
+
#
|
138
|
+
# source://temple//lib/temple/filter.rb#5
|
139
|
+
class Temple::Filter
|
140
|
+
include ::Temple::Utils
|
141
|
+
include ::Temple::Mixins::CompiledDispatcher
|
142
|
+
include ::Temple::Mixins::CoreDispatcher
|
143
|
+
include ::Temple::Mixins::EscapeDispatcher
|
144
|
+
include ::Temple::Mixins::ControlFlowDispatcher
|
145
|
+
include ::Temple::Mixins::Dispatcher
|
146
|
+
include ::Temple::Mixins::Options
|
147
|
+
extend ::Temple::Mixins::ClassOptions
|
148
|
+
extend ::Temple::Mixins::ThreadOptions
|
149
|
+
end
|
150
|
+
|
151
|
+
# Exception raised if something bad happens in a Temple filter
|
152
|
+
#
|
153
|
+
# @api public
|
154
|
+
#
|
155
|
+
# source://temple//lib/temple/exceptions.rb#12
|
156
|
+
class Temple::FilterError < ::RuntimeError; end
|
157
|
+
|
158
|
+
# source://temple//lib/temple.rb#44
|
159
|
+
module Temple::Filters; end
|
160
|
+
|
161
|
+
# source://temple//lib/temple/filters/ambles.rb#4
|
162
|
+
class Temple::Filters::Ambles < ::Temple::Filter
|
163
|
+
# @return [Ambles] a new instance of Ambles
|
164
|
+
#
|
165
|
+
# source://temple//lib/temple/filters/ambles.rb#7
|
166
|
+
def initialize(*_arg0); end
|
167
|
+
|
168
|
+
# source://temple//lib/temple/filters/ambles.rb#13
|
169
|
+
def call(ast); end
|
170
|
+
end
|
171
|
+
|
172
|
+
# @api public
|
173
|
+
#
|
174
|
+
# source://temple//lib/temple/filters/code_merger.rb#5
|
175
|
+
class Temple::Filters::CodeMerger < ::Temple::Filter
|
176
|
+
# @api public
|
177
|
+
#
|
178
|
+
# source://temple//lib/temple/filters/code_merger.rb#6
|
179
|
+
def on_multi(*exps); end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Control flow filter which processes [:if, condition, yes-exp, no-exp]
|
183
|
+
# and [:block, code, content] expressions.
|
184
|
+
# This is useful for ruby code generation with lots of conditionals.
|
185
|
+
#
|
186
|
+
# @api public
|
187
|
+
#
|
188
|
+
# source://temple//lib/temple/filters/control_flow.rb#9
|
189
|
+
class Temple::Filters::ControlFlow < ::Temple::Filter
|
190
|
+
# @api public
|
191
|
+
#
|
192
|
+
# source://temple//lib/temple/filters/control_flow.rb#35
|
193
|
+
def on_block(code, exp); end
|
194
|
+
|
195
|
+
# @api public
|
196
|
+
#
|
197
|
+
# source://temple//lib/temple/filters/control_flow.rb#21
|
198
|
+
def on_case(arg, *cases); end
|
199
|
+
|
200
|
+
# @api public
|
201
|
+
#
|
202
|
+
# source://temple//lib/temple/filters/control_flow.rb#31
|
203
|
+
def on_cond(*cases); end
|
204
|
+
|
205
|
+
# @api public
|
206
|
+
#
|
207
|
+
# source://temple//lib/temple/filters/control_flow.rb#10
|
208
|
+
def on_if(condition, yes, no = T.unsafe(nil)); end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Inlines several static/dynamic into a single dynamic.
|
212
|
+
#
|
213
|
+
# @api public
|
214
|
+
#
|
215
|
+
# source://temple//lib/temple/filters/dynamic_inliner.rb#7
|
216
|
+
class Temple::Filters::DynamicInliner < ::Temple::Filter
|
217
|
+
# @api public
|
218
|
+
#
|
219
|
+
# source://temple//lib/temple/filters/dynamic_inliner.rb#8
|
220
|
+
def on_multi(*exps); end
|
221
|
+
end
|
222
|
+
|
223
|
+
# Compile [:multi, [:static, 'foo'], [:dynamic, 'bar']] to [:dynamic, '"foo#{bar}"']
|
224
|
+
#
|
225
|
+
# source://temple//lib/temple/filters/dynamic_merger.rb#5
|
226
|
+
class Temple::Filters::DynamicMerger < ::Temple::Filter
|
227
|
+
# source://temple//lib/temple/filters/dynamic_merger.rb#6
|
228
|
+
def on_multi(*exps); end
|
229
|
+
|
230
|
+
private
|
231
|
+
|
232
|
+
# source://temple//lib/temple/filters/dynamic_merger.rb#56
|
233
|
+
def count_newline(exps); end
|
234
|
+
|
235
|
+
# source://temple//lib/temple/filters/dynamic_merger.rb#34
|
236
|
+
def merge_dynamic(exps); end
|
237
|
+
end
|
238
|
+
|
239
|
+
# Try to encode input string
|
240
|
+
#
|
241
|
+
# @api public
|
242
|
+
#
|
243
|
+
# source://temple//lib/temple/filters/encoding.rb#7
|
244
|
+
class Temple::Filters::Encoding < ::Temple::Parser
|
245
|
+
# @api public
|
246
|
+
#
|
247
|
+
# source://temple//lib/temple/filters/encoding.rb#10
|
248
|
+
def call(s); end
|
249
|
+
end
|
250
|
+
|
251
|
+
# Erase expressions with a certain type
|
252
|
+
#
|
253
|
+
# @api public
|
254
|
+
#
|
255
|
+
# source://temple//lib/temple/filters/eraser.rb#7
|
256
|
+
class Temple::Filters::Eraser < ::Temple::Filter
|
257
|
+
# @api public
|
258
|
+
#
|
259
|
+
# source://temple//lib/temple/filters/eraser.rb#11
|
260
|
+
def compile(exp); end
|
261
|
+
|
262
|
+
protected
|
263
|
+
|
264
|
+
# @api public
|
265
|
+
# @return [Boolean]
|
266
|
+
#
|
267
|
+
# source://temple//lib/temple/filters/eraser.rb#18
|
268
|
+
def do?(list, exp); end
|
269
|
+
end
|
270
|
+
|
271
|
+
# Escape dynamic or static expressions.
|
272
|
+
# This filter must be used after Temple::HTML::* and before the generators.
|
273
|
+
# It can be enclosed with Temple::Filters::DynamicInliner filters to
|
274
|
+
# reduce calls to Temple::Utils#escape_html.
|
275
|
+
#
|
276
|
+
# @api public
|
277
|
+
#
|
278
|
+
# source://temple//lib/temple/filters/escapable.rb#10
|
279
|
+
class Temple::Filters::Escapable < ::Temple::Filter
|
280
|
+
# @api public
|
281
|
+
# @return [Escapable] a new instance of Escapable
|
282
|
+
#
|
283
|
+
# source://temple//lib/temple/filters/escapable.rb#16
|
284
|
+
def initialize(opts = T.unsafe(nil)); end
|
285
|
+
|
286
|
+
# @api public
|
287
|
+
#
|
288
|
+
# source://temple//lib/temple/filters/escapable.rb#36
|
289
|
+
def on_dynamic(value); end
|
290
|
+
|
291
|
+
# @api public
|
292
|
+
#
|
293
|
+
# source://temple//lib/temple/filters/escapable.rb#24
|
294
|
+
def on_escape(flag, exp); end
|
295
|
+
|
296
|
+
# @api public
|
297
|
+
#
|
298
|
+
# source://temple//lib/temple/filters/escapable.rb#32
|
299
|
+
def on_static(value); end
|
300
|
+
end
|
301
|
+
|
302
|
+
# Flattens nested multi expressions
|
303
|
+
#
|
304
|
+
# @api public
|
305
|
+
#
|
306
|
+
# source://temple//lib/temple/filters/multi_flattener.rb#7
|
307
|
+
class Temple::Filters::MultiFlattener < ::Temple::Filter
|
308
|
+
# @api public
|
309
|
+
#
|
310
|
+
# source://temple//lib/temple/filters/multi_flattener.rb#8
|
311
|
+
def on_multi(*exps); end
|
312
|
+
end
|
313
|
+
|
314
|
+
# Remove BOM from input string
|
315
|
+
#
|
316
|
+
# @api public
|
317
|
+
#
|
318
|
+
# source://temple//lib/temple/filters/remove_bom.rb#7
|
319
|
+
class Temple::Filters::RemoveBOM < ::Temple::Parser
|
320
|
+
# @api public
|
321
|
+
#
|
322
|
+
# source://temple//lib/temple/filters/remove_bom.rb#8
|
323
|
+
def call(s); end
|
324
|
+
end
|
325
|
+
|
326
|
+
# Convert [:dynamic, code] to [:static, text] if code is static Ruby expression.
|
327
|
+
#
|
328
|
+
# source://temple//lib/temple/filters/static_analyzer.rb#5
|
329
|
+
class Temple::Filters::StaticAnalyzer < ::Temple::Filter
|
330
|
+
# source://temple//lib/temple/filters/static_analyzer.rb#6
|
331
|
+
def call(exp); end
|
332
|
+
|
333
|
+
# source://temple//lib/temple/filters/static_analyzer.rb#15
|
334
|
+
def on_dynamic(code); end
|
335
|
+
end
|
336
|
+
|
337
|
+
# Merges several statics into a single static. Example:
|
338
|
+
#
|
339
|
+
# [:multi,
|
340
|
+
# [:static, "Hello "],
|
341
|
+
# [:static, "World!"]]
|
342
|
+
#
|
343
|
+
# Compiles to:
|
344
|
+
#
|
345
|
+
# [:static, "Hello World!"]
|
346
|
+
#
|
347
|
+
# @api public
|
348
|
+
#
|
349
|
+
# source://temple//lib/temple/filters/static_merger.rb#15
|
350
|
+
class Temple::Filters::StaticMerger < ::Temple::Filter
|
351
|
+
# @api public
|
352
|
+
#
|
353
|
+
# source://temple//lib/temple/filters/static_merger.rb#16
|
354
|
+
def on_multi(*exps); end
|
355
|
+
end
|
356
|
+
|
357
|
+
# Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 'bar']]
|
358
|
+
#
|
359
|
+
# source://temple//lib/temple/filters/string_splitter.rb#10
|
360
|
+
class Temple::Filters::StringSplitter < ::Temple::Filter
|
361
|
+
# source://temple//lib/temple/filters/string_splitter.rb#89
|
362
|
+
def on_dynamic(code); end
|
363
|
+
|
364
|
+
private
|
365
|
+
|
366
|
+
# @return [Boolean]
|
367
|
+
#
|
368
|
+
# source://temple//lib/temple/filters/string_splitter.rb#107
|
369
|
+
def string_literal?(code); end
|
370
|
+
|
371
|
+
class << self
|
372
|
+
# `code` param must be valid string literal
|
373
|
+
#
|
374
|
+
# source://temple//lib/temple/filters/string_splitter.rb#14
|
375
|
+
def compile(code); end
|
376
|
+
|
377
|
+
private
|
378
|
+
|
379
|
+
# source://temple//lib/temple/filters/string_splitter.rb#42
|
380
|
+
def compile_tokens!(exps, tokens); end
|
381
|
+
|
382
|
+
# Some quotes are split-unsafe. Replace such quotes with null characters.
|
383
|
+
#
|
384
|
+
# source://temple//lib/temple/filters/string_splitter.rb#60
|
385
|
+
def escape_quotes(beg_str, end_str); end
|
386
|
+
|
387
|
+
# source://temple//lib/temple/filters/string_splitter.rb#69
|
388
|
+
def shift_balanced_embexpr(tokens); end
|
389
|
+
|
390
|
+
# source://temple//lib/temple/filters/string_splitter.rb#28
|
391
|
+
def strip_quotes!(tokens); end
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# source://temple//lib/temple/filters/string_splitter.rb#118
|
396
|
+
class Temple::Filters::StringSplitter::SyntaxChecker < ::Ripper
|
397
|
+
private
|
398
|
+
|
399
|
+
# @raise [ParseError]
|
400
|
+
#
|
401
|
+
# source://temple//lib/temple/filters/string_splitter.rb#130
|
402
|
+
def on_parse_error(*_arg0); end
|
403
|
+
|
404
|
+
class << self
|
405
|
+
# @return [Boolean]
|
406
|
+
#
|
407
|
+
# source://temple//lib/temple/filters/string_splitter.rb#121
|
408
|
+
def syntax_error?(code); end
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
# source://temple//lib/temple/filters/string_splitter.rb#119
|
413
|
+
class Temple::Filters::StringSplitter::SyntaxChecker::ParseError < ::StandardError; end
|
414
|
+
|
415
|
+
# Validates temple expression with given grammar
|
416
|
+
#
|
417
|
+
# @api public
|
418
|
+
#
|
419
|
+
# source://temple//lib/temple/filters/validator.rb#7
|
420
|
+
class Temple::Filters::Validator < ::Temple::Filter
|
421
|
+
# @api public
|
422
|
+
#
|
423
|
+
# source://temple//lib/temple/filters/validator.rb#10
|
424
|
+
def compile(exp); end
|
425
|
+
end
|
426
|
+
|
427
|
+
# Abstract generator base class
|
428
|
+
# Generators should inherit this class and
|
429
|
+
# compile the Core Abstraction to ruby code.
|
430
|
+
#
|
431
|
+
# @api public
|
432
|
+
#
|
433
|
+
# source://temple//lib/temple/generator.rb#8
|
434
|
+
class Temple::Generator
|
435
|
+
include ::Temple::Utils
|
436
|
+
include ::Temple::Mixins::CompiledDispatcher
|
437
|
+
include ::Temple::Mixins::Options
|
438
|
+
extend ::Temple::Mixins::ClassOptions
|
439
|
+
extend ::Temple::Mixins::ThreadOptions
|
440
|
+
|
441
|
+
# @api public
|
442
|
+
#
|
443
|
+
# source://temple//lib/temple/generator.rb#18
|
444
|
+
def call(exp); end
|
445
|
+
|
446
|
+
# @api public
|
447
|
+
#
|
448
|
+
# source://temple//lib/temple/generator.rb#38
|
449
|
+
def create_buffer; end
|
450
|
+
|
451
|
+
# @api public
|
452
|
+
# @raise [InvalidExpression]
|
453
|
+
#
|
454
|
+
# source://temple//lib/temple/generator.rb#45
|
455
|
+
def on(*exp); end
|
456
|
+
|
457
|
+
# @api public
|
458
|
+
#
|
459
|
+
# source://temple//lib/temple/generator.rb#57
|
460
|
+
def on_capture(name, exp); end
|
461
|
+
|
462
|
+
# @api public
|
463
|
+
#
|
464
|
+
# source://temple//lib/temple/generator.rb#71
|
465
|
+
def on_code(code); end
|
466
|
+
|
467
|
+
# @api public
|
468
|
+
#
|
469
|
+
# source://temple//lib/temple/generator.rb#67
|
470
|
+
def on_dynamic(code); end
|
471
|
+
|
472
|
+
# @api public
|
473
|
+
#
|
474
|
+
# source://temple//lib/temple/generator.rb#49
|
475
|
+
def on_multi(*exp); end
|
476
|
+
|
477
|
+
# @api public
|
478
|
+
#
|
479
|
+
# source://temple//lib/temple/generator.rb#53
|
480
|
+
def on_newline; end
|
481
|
+
|
482
|
+
# @api public
|
483
|
+
#
|
484
|
+
# source://temple//lib/temple/generator.rb#63
|
485
|
+
def on_static(text); end
|
486
|
+
|
487
|
+
# @api public
|
488
|
+
#
|
489
|
+
# source://temple//lib/temple/generator.rb#26
|
490
|
+
def postamble; end
|
491
|
+
|
492
|
+
# @api public
|
493
|
+
#
|
494
|
+
# source://temple//lib/temple/generator.rb#22
|
495
|
+
def preamble; end
|
496
|
+
|
497
|
+
# @api public
|
498
|
+
#
|
499
|
+
# source://temple//lib/temple/generator.rb#34
|
500
|
+
def restore_buffer; end
|
501
|
+
|
502
|
+
# @api public
|
503
|
+
#
|
504
|
+
# source://temple//lib/temple/generator.rb#41
|
505
|
+
def return_buffer; end
|
506
|
+
|
507
|
+
# @api public
|
508
|
+
#
|
509
|
+
# source://temple//lib/temple/generator.rb#30
|
510
|
+
def save_buffer; end
|
511
|
+
|
512
|
+
protected
|
513
|
+
|
514
|
+
# @api public
|
515
|
+
#
|
516
|
+
# source://temple//lib/temple/generator.rb#77
|
517
|
+
def buffer; end
|
518
|
+
|
519
|
+
# @api public
|
520
|
+
#
|
521
|
+
# source://temple//lib/temple/generator.rb#81
|
522
|
+
def capture_generator; end
|
523
|
+
|
524
|
+
# @api public
|
525
|
+
#
|
526
|
+
# source://temple//lib/temple/generator.rb#87
|
527
|
+
def concat(str); end
|
528
|
+
end
|
529
|
+
|
530
|
+
# source://temple//lib/temple.rb#36
|
531
|
+
module Temple::Generators; end
|
532
|
+
|
533
|
+
# Implements an array buffer.
|
534
|
+
#
|
535
|
+
# _buf = []
|
536
|
+
# _buf << "static"
|
537
|
+
# _buf << dynamic
|
538
|
+
# _buf
|
539
|
+
#
|
540
|
+
# @api public
|
541
|
+
#
|
542
|
+
# source://temple//lib/temple/generators/array.rb#12
|
543
|
+
class Temple::Generators::Array < ::Temple::Generator
|
544
|
+
# @api public
|
545
|
+
#
|
546
|
+
# source://temple//lib/temple/generators/array.rb#13
|
547
|
+
def create_buffer; end
|
548
|
+
|
549
|
+
# @api public
|
550
|
+
#
|
551
|
+
# source://temple//lib/temple/generators/array.rb#17
|
552
|
+
def return_buffer; end
|
553
|
+
end
|
554
|
+
|
555
|
+
# Just like Array, but calls #join on the array.
|
556
|
+
#
|
557
|
+
# _buf = []
|
558
|
+
# _buf << "static"
|
559
|
+
# _buf << dynamic
|
560
|
+
# _buf.join("")
|
561
|
+
#
|
562
|
+
# @api public
|
563
|
+
#
|
564
|
+
# source://temple//lib/temple/generators/array_buffer.rb#12
|
565
|
+
class Temple::Generators::ArrayBuffer < ::Temple::Generators::Array
|
566
|
+
# @api public
|
567
|
+
#
|
568
|
+
# source://temple//lib/temple/generators/array_buffer.rb#13
|
569
|
+
def call(exp); end
|
570
|
+
|
571
|
+
# @api public
|
572
|
+
#
|
573
|
+
# source://temple//lib/temple/generators/array_buffer.rb#24
|
574
|
+
def return_buffer; end
|
575
|
+
end
|
576
|
+
|
577
|
+
# Implements an ERB generator.
|
578
|
+
#
|
579
|
+
# @api public
|
580
|
+
#
|
581
|
+
# source://temple//lib/temple/generators/erb.rb#7
|
582
|
+
class Temple::Generators::ERB < ::Temple::Generator
|
583
|
+
# @api public
|
584
|
+
#
|
585
|
+
# source://temple//lib/temple/generators/erb.rb#8
|
586
|
+
def call(exp); end
|
587
|
+
|
588
|
+
# @api public
|
589
|
+
#
|
590
|
+
# source://temple//lib/temple/generators/erb.rb#16
|
591
|
+
def on_capture(name, exp); end
|
592
|
+
|
593
|
+
# @api public
|
594
|
+
#
|
595
|
+
# source://temple//lib/temple/generators/erb.rb#28
|
596
|
+
def on_code(code); end
|
597
|
+
|
598
|
+
# @api public
|
599
|
+
#
|
600
|
+
# source://temple//lib/temple/generators/erb.rb#24
|
601
|
+
def on_dynamic(code); end
|
602
|
+
|
603
|
+
# @api public
|
604
|
+
#
|
605
|
+
# source://temple//lib/temple/generators/erb.rb#12
|
606
|
+
def on_multi(*exp); end
|
607
|
+
|
608
|
+
# @api public
|
609
|
+
#
|
610
|
+
# source://temple//lib/temple/generators/erb.rb#20
|
611
|
+
def on_static(text); end
|
612
|
+
end
|
613
|
+
|
614
|
+
# Implements a rails output buffer.
|
615
|
+
#
|
616
|
+
# @output_buffer = ActiveSupport::SafeBuffer
|
617
|
+
# @output_buffer.safe_concat "static"
|
618
|
+
# @output_buffer.safe_concat dynamic.to_s
|
619
|
+
# @output_buffer
|
620
|
+
#
|
621
|
+
# @api public
|
622
|
+
#
|
623
|
+
# source://temple//lib/temple/generators/rails_output_buffer.rb#12
|
624
|
+
class Temple::Generators::RailsOutputBuffer < ::Temple::Generators::StringBuffer
|
625
|
+
# @api public
|
626
|
+
#
|
627
|
+
# source://temple//lib/temple/generators/rails_output_buffer.rb#18
|
628
|
+
def call(exp); end
|
629
|
+
|
630
|
+
# @api public
|
631
|
+
#
|
632
|
+
# source://temple//lib/temple/generators/rails_output_buffer.rb#30
|
633
|
+
def concat(str); end
|
634
|
+
|
635
|
+
# @api public
|
636
|
+
#
|
637
|
+
# source://temple//lib/temple/generators/rails_output_buffer.rb#22
|
638
|
+
def create_buffer; end
|
639
|
+
end
|
640
|
+
|
641
|
+
# Implements a string buffer.
|
642
|
+
#
|
643
|
+
# _buf = ''
|
644
|
+
# _buf << "static"
|
645
|
+
# _buf << dynamic.to_s
|
646
|
+
# _buf
|
647
|
+
#
|
648
|
+
# @api public
|
649
|
+
#
|
650
|
+
# source://temple//lib/temple/generators/string_buffer.rb#12
|
651
|
+
class Temple::Generators::StringBuffer < ::Temple::Generators::ArrayBuffer
|
652
|
+
# @api public
|
653
|
+
#
|
654
|
+
# source://temple//lib/temple/generators/string_buffer.rb#13
|
655
|
+
def create_buffer; end
|
656
|
+
|
657
|
+
# @api public
|
658
|
+
#
|
659
|
+
# source://temple//lib/temple/generators/string_buffer.rb#21
|
660
|
+
def on_dynamic(code); end
|
661
|
+
|
662
|
+
# @api public
|
663
|
+
#
|
664
|
+
# source://temple//lib/temple/generators/string_buffer.rb#17
|
665
|
+
def return_buffer; end
|
666
|
+
end
|
667
|
+
|
668
|
+
# Temple expression grammar which can be used to validate Temple expressions.
|
669
|
+
#
|
670
|
+
# Example:
|
671
|
+
# Temple::Grammar.match? [:static, 'Valid Temple Expression']
|
672
|
+
# Temple::Grammar.validate! [:multi, 'Invalid Temple Expression']
|
673
|
+
#
|
674
|
+
# See {file:EXPRESSIONS.md Expression documentation}.
|
675
|
+
#
|
676
|
+
# @api public
|
677
|
+
#
|
678
|
+
# source://temple//lib/temple/grammar.rb#12
|
679
|
+
module Temple::Grammar
|
680
|
+
extend ::Temple::Mixins::GrammarDSL
|
681
|
+
end
|
682
|
+
|
683
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
684
|
+
Temple::Grammar::Bool = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
685
|
+
|
686
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
687
|
+
Temple::Grammar::Case = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
688
|
+
|
689
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
690
|
+
Temple::Grammar::Condition = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
691
|
+
|
692
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
693
|
+
Temple::Grammar::EmptyExp = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
694
|
+
|
695
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
696
|
+
Temple::Grammar::Expression = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
697
|
+
|
698
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
699
|
+
Temple::Grammar::HTMLAttr = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
700
|
+
|
701
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#168
|
702
|
+
Temple::Grammar::HTMLIdentifier = T.let(T.unsafe(nil), Temple::Mixins::GrammarDSL::Root)
|
703
|
+
|
704
|
+
# source://temple//lib/temple.rb#61
|
705
|
+
module Temple::HTML; end
|
706
|
+
|
707
|
+
# This filter merges html attributes (e.g. used for id and class)
|
708
|
+
#
|
709
|
+
# @api public
|
710
|
+
#
|
711
|
+
# source://temple//lib/temple/html/attribute_merger.rb#6
|
712
|
+
class Temple::HTML::AttributeMerger < ::Temple::HTML::Filter
|
713
|
+
# @api public
|
714
|
+
#
|
715
|
+
# source://temple//lib/temple/html/attribute_merger.rb#9
|
716
|
+
def on_html_attrs(*attrs); end
|
717
|
+
end
|
718
|
+
|
719
|
+
# This filter removes empty attributes
|
720
|
+
#
|
721
|
+
# @api public
|
722
|
+
#
|
723
|
+
# source://temple//lib/temple/html/attribute_remover.rb#6
|
724
|
+
class Temple::HTML::AttributeRemover < ::Temple::HTML::Filter
|
725
|
+
# @api public
|
726
|
+
# @raise [ArgumentError]
|
727
|
+
# @return [AttributeRemover] a new instance of AttributeRemover
|
728
|
+
#
|
729
|
+
# source://temple//lib/temple/html/attribute_remover.rb#9
|
730
|
+
def initialize(opts = T.unsafe(nil)); end
|
731
|
+
|
732
|
+
# @api public
|
733
|
+
#
|
734
|
+
# source://temple//lib/temple/html/attribute_remover.rb#19
|
735
|
+
def on_html_attr(name, value); end
|
736
|
+
|
737
|
+
# @api public
|
738
|
+
#
|
739
|
+
# source://temple//lib/temple/html/attribute_remover.rb#15
|
740
|
+
def on_html_attrs(*attrs); end
|
741
|
+
end
|
742
|
+
|
743
|
+
# This filter sorts html attributes.
|
744
|
+
#
|
745
|
+
# @api public
|
746
|
+
#
|
747
|
+
# source://temple//lib/temple/html/attribute_sorter.rb#6
|
748
|
+
class Temple::HTML::AttributeSorter < ::Temple::HTML::Filter
|
749
|
+
# @api public
|
750
|
+
#
|
751
|
+
# source://temple//lib/temple/html/attribute_sorter.rb#9
|
752
|
+
def call(exp); end
|
753
|
+
|
754
|
+
# @api public
|
755
|
+
#
|
756
|
+
# source://temple//lib/temple/html/attribute_sorter.rb#13
|
757
|
+
def on_html_attrs(*attrs); end
|
758
|
+
end
|
759
|
+
|
760
|
+
# @api private
|
761
|
+
#
|
762
|
+
# source://temple//lib/temple/html/dispatcher.rb#5
|
763
|
+
module Temple::HTML::Dispatcher
|
764
|
+
# @api private
|
765
|
+
#
|
766
|
+
# source://temple//lib/temple/html/dispatcher.rb#10
|
767
|
+
def on_html_attr(name, content); end
|
768
|
+
|
769
|
+
# @api private
|
770
|
+
#
|
771
|
+
# source://temple//lib/temple/html/dispatcher.rb#6
|
772
|
+
def on_html_attrs(*attrs); end
|
773
|
+
|
774
|
+
# @api private
|
775
|
+
#
|
776
|
+
# source://temple//lib/temple/html/dispatcher.rb#14
|
777
|
+
def on_html_comment(content); end
|
778
|
+
|
779
|
+
# @api private
|
780
|
+
#
|
781
|
+
# source://temple//lib/temple/html/dispatcher.rb#18
|
782
|
+
def on_html_condcomment(condition, content); end
|
783
|
+
|
784
|
+
# @api private
|
785
|
+
#
|
786
|
+
# source://temple//lib/temple/html/dispatcher.rb#22
|
787
|
+
def on_html_js(content); end
|
788
|
+
|
789
|
+
# @api private
|
790
|
+
#
|
791
|
+
# source://temple//lib/temple/html/dispatcher.rb#26
|
792
|
+
def on_html_tag(name, attrs, content = T.unsafe(nil)); end
|
793
|
+
end
|
794
|
+
|
795
|
+
# @api public
|
796
|
+
#
|
797
|
+
# source://temple//lib/temple/html/fast.rb#5
|
798
|
+
class Temple::HTML::Fast < ::Temple::HTML::Filter
|
799
|
+
# @api public
|
800
|
+
# @return [Fast] a new instance of Fast
|
801
|
+
#
|
802
|
+
# source://temple//lib/temple/html/fast.rb#37
|
803
|
+
def initialize(opts = T.unsafe(nil)); end
|
804
|
+
|
805
|
+
# @api public
|
806
|
+
#
|
807
|
+
# source://temple//lib/temple/html/fast.rb#108
|
808
|
+
def on_html_attr(name, value); end
|
809
|
+
|
810
|
+
# @api public
|
811
|
+
#
|
812
|
+
# source://temple//lib/temple/html/fast.rb#104
|
813
|
+
def on_html_attrs(*attrs); end
|
814
|
+
|
815
|
+
# @api public
|
816
|
+
#
|
817
|
+
# source://temple//lib/temple/html/fast.rb#80
|
818
|
+
def on_html_comment(content); end
|
819
|
+
|
820
|
+
# @api public
|
821
|
+
#
|
822
|
+
# source://temple//lib/temple/html/fast.rb#87
|
823
|
+
def on_html_condcomment(condition, content); end
|
824
|
+
|
825
|
+
# @api public
|
826
|
+
#
|
827
|
+
# source://temple//lib/temple/html/fast.rb#66
|
828
|
+
def on_html_doctype(type); end
|
829
|
+
|
830
|
+
# @api public
|
831
|
+
#
|
832
|
+
# source://temple//lib/temple/html/fast.rb#119
|
833
|
+
def on_html_js(content); end
|
834
|
+
|
835
|
+
# @api public
|
836
|
+
#
|
837
|
+
# source://temple//lib/temple/html/fast.rb#94
|
838
|
+
def on_html_tag(name, attrs, content = T.unsafe(nil)); end
|
839
|
+
end
|
840
|
+
|
841
|
+
# @api public
|
842
|
+
#
|
843
|
+
# source://temple//lib/temple/html/fast.rb#6
|
844
|
+
Temple::HTML::Fast::DOCTYPES = T.let(T.unsafe(nil), Hash)
|
845
|
+
|
846
|
+
# See http://www.w3.org/html/wg/drafts/html/master/single-page.html#void-elements
|
847
|
+
#
|
848
|
+
# @api public
|
849
|
+
#
|
850
|
+
# source://temple//lib/temple/html/fast.rb#30
|
851
|
+
Temple::HTML::Fast::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Array)
|
852
|
+
|
853
|
+
# @api public
|
854
|
+
#
|
855
|
+
# source://temple//lib/temple/html/filter.rb#5
|
856
|
+
class Temple::HTML::Filter < ::Temple::Filter
|
857
|
+
include ::Temple::HTML::Dispatcher
|
858
|
+
|
859
|
+
# @api public
|
860
|
+
# @return [Boolean]
|
861
|
+
#
|
862
|
+
# source://temple//lib/temple/html/filter.rb#8
|
863
|
+
def contains_nonempty_static?(exp); end
|
864
|
+
end
|
865
|
+
|
866
|
+
# @api public
|
867
|
+
#
|
868
|
+
# source://temple//lib/temple/html/pretty.rb#5
|
869
|
+
class Temple::HTML::Pretty < ::Temple::HTML::Fast
|
870
|
+
# @api public
|
871
|
+
# @return [Pretty] a new instance of Pretty
|
872
|
+
#
|
873
|
+
# source://temple//lib/temple/html/pretty.rb#15
|
874
|
+
def initialize(opts = T.unsafe(nil)); end
|
875
|
+
|
876
|
+
# @api public
|
877
|
+
#
|
878
|
+
# source://temple//lib/temple/html/pretty.rb#23
|
879
|
+
def call(exp); end
|
880
|
+
|
881
|
+
# @api public
|
882
|
+
#
|
883
|
+
# source://temple//lib/temple/html/pretty.rb#37
|
884
|
+
def on_dynamic(code); end
|
885
|
+
|
886
|
+
# @api public
|
887
|
+
#
|
888
|
+
# source://temple//lib/temple/html/pretty.rb#48
|
889
|
+
def on_html_comment(content); end
|
890
|
+
|
891
|
+
# @api public
|
892
|
+
#
|
893
|
+
# source://temple//lib/temple/html/pretty.rb#43
|
894
|
+
def on_html_doctype(type); end
|
895
|
+
|
896
|
+
# @api public
|
897
|
+
#
|
898
|
+
# source://temple//lib/temple/html/pretty.rb#55
|
899
|
+
def on_html_tag(name, attrs, content = T.unsafe(nil)); end
|
900
|
+
|
901
|
+
# @api public
|
902
|
+
#
|
903
|
+
# source://temple//lib/temple/html/pretty.rb#27
|
904
|
+
def on_static(content); end
|
905
|
+
|
906
|
+
protected
|
907
|
+
|
908
|
+
# @api public
|
909
|
+
#
|
910
|
+
# source://temple//lib/temple/html/pretty.rb#87
|
911
|
+
def indent; end
|
912
|
+
|
913
|
+
# @api public
|
914
|
+
#
|
915
|
+
# source://temple//lib/temple/html/pretty.rb#81
|
916
|
+
def preamble; end
|
917
|
+
|
918
|
+
# Return indentation before tag
|
919
|
+
#
|
920
|
+
# @api public
|
921
|
+
#
|
922
|
+
# source://temple//lib/temple/html/pretty.rb#92
|
923
|
+
def tag_indent(name); end
|
924
|
+
end
|
925
|
+
|
926
|
+
# Immutable map class which supports map merging
|
927
|
+
#
|
928
|
+
# @api public
|
929
|
+
#
|
930
|
+
# source://temple//lib/temple/map.rb#5
|
931
|
+
class Temple::ImmutableMap
|
932
|
+
include ::Enumerable
|
933
|
+
|
934
|
+
# @api public
|
935
|
+
# @return [ImmutableMap] a new instance of ImmutableMap
|
936
|
+
#
|
937
|
+
# source://temple//lib/temple/map.rb#8
|
938
|
+
def initialize(*map); end
|
939
|
+
|
940
|
+
# @api public
|
941
|
+
#
|
942
|
+
# source://temple//lib/temple/map.rb#16
|
943
|
+
def [](key); end
|
944
|
+
|
945
|
+
# @api public
|
946
|
+
#
|
947
|
+
# source://temple//lib/temple/map.rb#21
|
948
|
+
def each; end
|
949
|
+
|
950
|
+
# @api public
|
951
|
+
# @return [Boolean]
|
952
|
+
#
|
953
|
+
# source://temple//lib/temple/map.rb#12
|
954
|
+
def include?(key); end
|
955
|
+
|
956
|
+
# @api public
|
957
|
+
#
|
958
|
+
# source://temple//lib/temple/map.rb#25
|
959
|
+
def keys; end
|
960
|
+
|
961
|
+
# @api public
|
962
|
+
#
|
963
|
+
# source://temple//lib/temple/map.rb#33
|
964
|
+
def to_hash; end
|
965
|
+
|
966
|
+
# @api public
|
967
|
+
#
|
968
|
+
# source://temple//lib/temple/map.rb#29
|
969
|
+
def values; end
|
970
|
+
end
|
971
|
+
|
972
|
+
# Exception raised if invalid temple expression is found
|
973
|
+
#
|
974
|
+
# @api public
|
975
|
+
#
|
976
|
+
# source://temple//lib/temple/exceptions.rb#6
|
977
|
+
class Temple::InvalidExpression < ::RuntimeError; end
|
978
|
+
|
979
|
+
# source://temple//lib/temple.rb#19
|
980
|
+
module Temple::Mixins; end
|
981
|
+
|
982
|
+
# @api public
|
983
|
+
#
|
984
|
+
# source://temple//lib/temple/mixins/options.rb#5
|
985
|
+
module Temple::Mixins::ClassOptions
|
986
|
+
# @api public
|
987
|
+
#
|
988
|
+
# source://temple//lib/temple/mixins/options.rb#11
|
989
|
+
def default_options; end
|
990
|
+
|
991
|
+
# @api public
|
992
|
+
#
|
993
|
+
# source://temple//lib/temple/mixins/options.rb#36
|
994
|
+
def define_deprecated_options(*opts); end
|
995
|
+
|
996
|
+
# @api public
|
997
|
+
#
|
998
|
+
# source://temple//lib/temple/mixins/options.rb#27
|
999
|
+
def define_options(*opts); end
|
1000
|
+
|
1001
|
+
# @api public
|
1002
|
+
#
|
1003
|
+
# source://temple//lib/temple/mixins/options.rb#45
|
1004
|
+
def disable_option_validator!; end
|
1005
|
+
|
1006
|
+
# @api public
|
1007
|
+
#
|
1008
|
+
# source://temple//lib/temple/mixins/options.rb#20
|
1009
|
+
def options; end
|
1010
|
+
|
1011
|
+
# @api public
|
1012
|
+
#
|
1013
|
+
# source://temple//lib/temple/mixins/options.rb#6
|
1014
|
+
def set_default_options(opts); end
|
1015
|
+
|
1016
|
+
# @api public
|
1017
|
+
#
|
1018
|
+
# source://temple//lib/temple/mixins/options.rb#16
|
1019
|
+
def set_options(opts); end
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
# @api private
|
1023
|
+
#
|
1024
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#44
|
1025
|
+
module Temple::Mixins::CompiledDispatcher
|
1026
|
+
# @api private
|
1027
|
+
#
|
1028
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#45
|
1029
|
+
def call(exp); end
|
1030
|
+
|
1031
|
+
# @api private
|
1032
|
+
#
|
1033
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#49
|
1034
|
+
def compile(exp); end
|
1035
|
+
|
1036
|
+
private
|
1037
|
+
|
1038
|
+
# @api private
|
1039
|
+
#
|
1040
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#73
|
1041
|
+
def dispatched_methods; end
|
1042
|
+
|
1043
|
+
# @api private
|
1044
|
+
#
|
1045
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#55
|
1046
|
+
def dispatcher(exp); end
|
1047
|
+
|
1048
|
+
# @api private
|
1049
|
+
#
|
1050
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#59
|
1051
|
+
def replace_dispatcher(exp); end
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
# @api private
|
1055
|
+
#
|
1056
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#79
|
1057
|
+
class Temple::Mixins::CompiledDispatcher::DispatchNode < ::Hash
|
1058
|
+
# @api private
|
1059
|
+
# @return [DispatchNode] a new instance of DispatchNode
|
1060
|
+
#
|
1061
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#82
|
1062
|
+
def initialize; end
|
1063
|
+
|
1064
|
+
# @api private
|
1065
|
+
#
|
1066
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#87
|
1067
|
+
def compile(level = T.unsafe(nil), call_parent = T.unsafe(nil)); end
|
1068
|
+
|
1069
|
+
# @api private
|
1070
|
+
#
|
1071
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#80
|
1072
|
+
def method; end
|
1073
|
+
|
1074
|
+
# @api private
|
1075
|
+
#
|
1076
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#80
|
1077
|
+
def method=(_arg0); end
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
# @api private
|
1081
|
+
#
|
1082
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#25
|
1083
|
+
module Temple::Mixins::ControlFlowDispatcher
|
1084
|
+
# @api private
|
1085
|
+
#
|
1086
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#34
|
1087
|
+
def on_block(code, content); end
|
1088
|
+
|
1089
|
+
# @api private
|
1090
|
+
#
|
1091
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#30
|
1092
|
+
def on_case(arg, *cases); end
|
1093
|
+
|
1094
|
+
# @api private
|
1095
|
+
#
|
1096
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#38
|
1097
|
+
def on_cond(*cases); end
|
1098
|
+
|
1099
|
+
# @api private
|
1100
|
+
#
|
1101
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#26
|
1102
|
+
def on_if(condition, *cases); end
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# @api private
|
1106
|
+
#
|
1107
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#5
|
1108
|
+
module Temple::Mixins::CoreDispatcher
|
1109
|
+
# @api private
|
1110
|
+
#
|
1111
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#12
|
1112
|
+
def on_capture(name, exp); end
|
1113
|
+
|
1114
|
+
# @api private
|
1115
|
+
#
|
1116
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#6
|
1117
|
+
def on_multi(*exps); end
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
# Implements a compatible call-method
|
1121
|
+
# based on the including classe's methods.
|
1122
|
+
#
|
1123
|
+
# It uses every method starting with
|
1124
|
+
# "on" and uses the rest of the method
|
1125
|
+
# name as prefix of the expression it
|
1126
|
+
# will receive. So, if a dispatcher
|
1127
|
+
# has a method named "on_x", this method
|
1128
|
+
# will be called with arg0,..,argN
|
1129
|
+
# whenever an expression like [:x, arg0,..,argN ]
|
1130
|
+
# is encountered.
|
1131
|
+
#
|
1132
|
+
# This works with longer prefixes, too.
|
1133
|
+
# For example a method named "on_y_z"
|
1134
|
+
# will be called whenever an expression
|
1135
|
+
# like [:y, :z, .. ] is found. Furthermore,
|
1136
|
+
# if additionally a method named "on_y"
|
1137
|
+
# is present, it will be called when an
|
1138
|
+
# expression starts with :y but then does
|
1139
|
+
# not contain with :z. This way a
|
1140
|
+
# dispatcher can implement namespaces.
|
1141
|
+
#
|
1142
|
+
# @api public
|
1143
|
+
# @example
|
1144
|
+
# class MyAwesomeDispatch
|
1145
|
+
# include Temple::Mixins::Dispatcher
|
1146
|
+
# def on_awesome(thing) # keep awesome things
|
1147
|
+
# return [:awesome, thing]
|
1148
|
+
# end
|
1149
|
+
# def on_boring(thing) # make boring things awesome
|
1150
|
+
# return [:awesome, thing+" with bacon"]
|
1151
|
+
# end
|
1152
|
+
# def on(type,*args) # unknown stuff is boring too
|
1153
|
+
# return [:awesome, 'just bacon']
|
1154
|
+
# end
|
1155
|
+
# end
|
1156
|
+
# filter = MyAwesomeDispatch.new
|
1157
|
+
# # Boring things are converted:
|
1158
|
+
# filter.call([:boring, 'egg']) #=> [:awesome, 'egg with bacon']
|
1159
|
+
# # Unknown things too:
|
1160
|
+
# filter.call([:foo]) #=> [:awesome, 'just bacon']
|
1161
|
+
# # Known but not boring things won't be touched:
|
1162
|
+
# filter.call([:awesome, 'chuck norris']) #=>[:awesome, 'chuck norris']
|
1163
|
+
# @note Processing does not reach into unknown
|
1164
|
+
# expression types by default.
|
1165
|
+
#
|
1166
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#155
|
1167
|
+
module Temple::Mixins::Dispatcher
|
1168
|
+
include ::Temple::Mixins::CompiledDispatcher
|
1169
|
+
include ::Temple::Mixins::CoreDispatcher
|
1170
|
+
include ::Temple::Mixins::EscapeDispatcher
|
1171
|
+
include ::Temple::Mixins::ControlFlowDispatcher
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# @api private
|
1175
|
+
#
|
1176
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#5
|
1177
|
+
module Temple::Mixins::EngineDSL
|
1178
|
+
# @api private
|
1179
|
+
#
|
1180
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#35
|
1181
|
+
def after(name, *args, &block); end
|
1182
|
+
|
1183
|
+
# @api private
|
1184
|
+
#
|
1185
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#9
|
1186
|
+
def append(*args, &block); end
|
1187
|
+
|
1188
|
+
# @api private
|
1189
|
+
#
|
1190
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#27
|
1191
|
+
def before(name, *args, &block); end
|
1192
|
+
|
1193
|
+
# @api private
|
1194
|
+
#
|
1195
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#6
|
1196
|
+
def chain_modified!; end
|
1197
|
+
|
1198
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#55
|
1199
|
+
def filter(name, *options); end
|
1200
|
+
|
1201
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#55
|
1202
|
+
def generator(name, *options); end
|
1203
|
+
|
1204
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#55
|
1205
|
+
def html(name, *options); end
|
1206
|
+
|
1207
|
+
# @api private
|
1208
|
+
#
|
1209
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#14
|
1210
|
+
def prepend(*args, &block); end
|
1211
|
+
|
1212
|
+
# @api private
|
1213
|
+
#
|
1214
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#19
|
1215
|
+
def remove(name); end
|
1216
|
+
|
1217
|
+
# @api private
|
1218
|
+
#
|
1219
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#43
|
1220
|
+
def replace(name, *args, &block); end
|
1221
|
+
|
1222
|
+
# @api private
|
1223
|
+
#
|
1224
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#9
|
1225
|
+
def use(*args, &block); end
|
1226
|
+
|
1227
|
+
private
|
1228
|
+
|
1229
|
+
# @api private
|
1230
|
+
#
|
1231
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#75
|
1232
|
+
def chain_class_constructor(filter, local_options); end
|
1233
|
+
|
1234
|
+
# @api private
|
1235
|
+
#
|
1236
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#108
|
1237
|
+
def chain_element(args, block); end
|
1238
|
+
|
1239
|
+
# @api private
|
1240
|
+
#
|
1241
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#62
|
1242
|
+
def chain_name(name); end
|
1243
|
+
|
1244
|
+
# @api private
|
1245
|
+
# @raise [ArgumentError]
|
1246
|
+
#
|
1247
|
+
# source://temple//lib/temple/mixins/engine_dsl.rb#85
|
1248
|
+
def chain_proc_constructor(name, filter); end
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# @api private
|
1252
|
+
#
|
1253
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#18
|
1254
|
+
module Temple::Mixins::EscapeDispatcher
|
1255
|
+
# @api private
|
1256
|
+
#
|
1257
|
+
# source://temple//lib/temple/mixins/dispatcher.rb#19
|
1258
|
+
def on_escape(flag, exp); end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
# @api private
|
1262
|
+
#
|
1263
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#5
|
1264
|
+
module Temple::Mixins::GrammarDSL
|
1265
|
+
# @api private
|
1266
|
+
# @return [Boolean]
|
1267
|
+
#
|
1268
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#123
|
1269
|
+
def ===(exp); end
|
1270
|
+
|
1271
|
+
# @api private
|
1272
|
+
# @return [Boolean]
|
1273
|
+
#
|
1274
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#123
|
1275
|
+
def =~(exp); end
|
1276
|
+
|
1277
|
+
# @api private
|
1278
|
+
#
|
1279
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#137
|
1280
|
+
def Rule(rule); end
|
1281
|
+
|
1282
|
+
# @api private
|
1283
|
+
#
|
1284
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#133
|
1285
|
+
def Value(value); end
|
1286
|
+
|
1287
|
+
# @api private
|
1288
|
+
#
|
1289
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#167
|
1290
|
+
def const_missing(name); end
|
1291
|
+
|
1292
|
+
# @api private
|
1293
|
+
#
|
1294
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#116
|
1295
|
+
def extended(mod); end
|
1296
|
+
|
1297
|
+
# @api private
|
1298
|
+
# @return [Boolean]
|
1299
|
+
#
|
1300
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#123
|
1301
|
+
def match?(exp); end
|
1302
|
+
|
1303
|
+
# @api private
|
1304
|
+
#
|
1305
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#129
|
1306
|
+
def validate!(exp); end
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
# @api private
|
1310
|
+
#
|
1311
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#85
|
1312
|
+
class Temple::Mixins::GrammarDSL::Element < ::Temple::Mixins::GrammarDSL::Or
|
1313
|
+
# @api private
|
1314
|
+
# @return [Element] a new instance of Element
|
1315
|
+
#
|
1316
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#86
|
1317
|
+
def initialize(grammar, rule); end
|
1318
|
+
|
1319
|
+
# @api private
|
1320
|
+
#
|
1321
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#97
|
1322
|
+
def after_copy(source); end
|
1323
|
+
|
1324
|
+
# @api private
|
1325
|
+
#
|
1326
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#91
|
1327
|
+
def match(exp, unmatched); end
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# @api private
|
1331
|
+
#
|
1332
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#28
|
1333
|
+
class Temple::Mixins::GrammarDSL::Or < ::Temple::Mixins::GrammarDSL::Rule
|
1334
|
+
# @api private
|
1335
|
+
# @return [Or] a new instance of Or
|
1336
|
+
#
|
1337
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#29
|
1338
|
+
def initialize(grammar, *children); end
|
1339
|
+
|
1340
|
+
# @api private
|
1341
|
+
#
|
1342
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#34
|
1343
|
+
def <<(rule); end
|
1344
|
+
|
1345
|
+
# @api private
|
1346
|
+
#
|
1347
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#46
|
1348
|
+
def after_copy(source); end
|
1349
|
+
|
1350
|
+
# @api private
|
1351
|
+
#
|
1352
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#41
|
1353
|
+
def match(exp, unmatched); end
|
1354
|
+
|
1355
|
+
# @api private
|
1356
|
+
#
|
1357
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#34
|
1358
|
+
def |(rule); end
|
1359
|
+
end
|
1360
|
+
|
1361
|
+
# @api private
|
1362
|
+
#
|
1363
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#51
|
1364
|
+
class Temple::Mixins::GrammarDSL::Root < ::Temple::Mixins::GrammarDSL::Or
|
1365
|
+
# @api private
|
1366
|
+
# @return [Root] a new instance of Root
|
1367
|
+
#
|
1368
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#52
|
1369
|
+
def initialize(grammar, name); end
|
1370
|
+
|
1371
|
+
# @api private
|
1372
|
+
#
|
1373
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#79
|
1374
|
+
def after_copy(source); end
|
1375
|
+
|
1376
|
+
# @api private
|
1377
|
+
#
|
1378
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#75
|
1379
|
+
def copy_to(grammar); end
|
1380
|
+
|
1381
|
+
# @api private
|
1382
|
+
#
|
1383
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#57
|
1384
|
+
def match(exp, unmatched); end
|
1385
|
+
|
1386
|
+
# @api private
|
1387
|
+
#
|
1388
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#63
|
1389
|
+
def validate!(exp); end
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
# @api private
|
1393
|
+
#
|
1394
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#6
|
1395
|
+
class Temple::Mixins::GrammarDSL::Rule
|
1396
|
+
# @api private
|
1397
|
+
# @return [Rule] a new instance of Rule
|
1398
|
+
#
|
1399
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#7
|
1400
|
+
def initialize(grammar); end
|
1401
|
+
|
1402
|
+
# @api private
|
1403
|
+
# @return [Boolean]
|
1404
|
+
#
|
1405
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#11
|
1406
|
+
def ===(exp); end
|
1407
|
+
|
1408
|
+
# @api private
|
1409
|
+
# @return [Boolean]
|
1410
|
+
#
|
1411
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#11
|
1412
|
+
def =~(exp); end
|
1413
|
+
|
1414
|
+
# @api private
|
1415
|
+
#
|
1416
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#21
|
1417
|
+
def copy_to(grammar); end
|
1418
|
+
|
1419
|
+
# @api private
|
1420
|
+
# @return [Boolean]
|
1421
|
+
#
|
1422
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#11
|
1423
|
+
def match?(exp); end
|
1424
|
+
|
1425
|
+
# @api private
|
1426
|
+
#
|
1427
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#17
|
1428
|
+
def |(rule); end
|
1429
|
+
end
|
1430
|
+
|
1431
|
+
# @api private
|
1432
|
+
#
|
1433
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#105
|
1434
|
+
class Temple::Mixins::GrammarDSL::Value < ::Temple::Mixins::GrammarDSL::Rule
|
1435
|
+
# @api private
|
1436
|
+
# @return [Value] a new instance of Value
|
1437
|
+
#
|
1438
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#106
|
1439
|
+
def initialize(grammar, value); end
|
1440
|
+
|
1441
|
+
# @api private
|
1442
|
+
#
|
1443
|
+
# source://temple//lib/temple/mixins/grammar_dsl.rb#111
|
1444
|
+
def match(exp, unmatched); end
|
1445
|
+
end
|
1446
|
+
|
1447
|
+
# @api public
|
1448
|
+
#
|
1449
|
+
# source://temple//lib/temple/mixins/options.rb#71
|
1450
|
+
module Temple::Mixins::Options
|
1451
|
+
mixes_in_class_methods ::Temple::Mixins::ClassOptions
|
1452
|
+
mixes_in_class_methods ::Temple::Mixins::ThreadOptions
|
1453
|
+
|
1454
|
+
# @api public
|
1455
|
+
#
|
1456
|
+
# source://temple//lib/temple/mixins/options.rb#81
|
1457
|
+
def initialize(opts = T.unsafe(nil)); end
|
1458
|
+
|
1459
|
+
# @api public
|
1460
|
+
#
|
1461
|
+
# source://temple//lib/temple/mixins/options.rb#79
|
1462
|
+
def options; end
|
1463
|
+
|
1464
|
+
class << self
|
1465
|
+
# @api public
|
1466
|
+
# @private
|
1467
|
+
#
|
1468
|
+
# source://temple//lib/temple/mixins/options.rb#72
|
1469
|
+
def included(base); end
|
1470
|
+
end
|
1471
|
+
end
|
1472
|
+
|
1473
|
+
# @api private
|
1474
|
+
#
|
1475
|
+
# source://temple//lib/temple/mixins/template.rb#5
|
1476
|
+
module Temple::Mixins::Template
|
1477
|
+
include ::Temple::Mixins::ClassOptions
|
1478
|
+
|
1479
|
+
# @api private
|
1480
|
+
#
|
1481
|
+
# source://temple//lib/temple/mixins/template.rb#8
|
1482
|
+
def compile(code, options); end
|
1483
|
+
|
1484
|
+
# @api private
|
1485
|
+
#
|
1486
|
+
# source://temple//lib/temple/mixins/template.rb#18
|
1487
|
+
def create(engine, options); end
|
1488
|
+
|
1489
|
+
# @api private
|
1490
|
+
# @raise [NotImplementedError]
|
1491
|
+
#
|
1492
|
+
# source://temple//lib/temple/mixins/template.rb#14
|
1493
|
+
def register_as(*names); end
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
# source://temple//lib/temple/mixins/options.rb#50
|
1497
|
+
module Temple::Mixins::ThreadOptions
|
1498
|
+
# source://temple//lib/temple/mixins/options.rb#59
|
1499
|
+
def thread_options; end
|
1500
|
+
|
1501
|
+
# source://temple//lib/temple/mixins/options.rb#51
|
1502
|
+
def with_options(options); end
|
1503
|
+
|
1504
|
+
protected
|
1505
|
+
|
1506
|
+
# source://temple//lib/temple/mixins/options.rb#65
|
1507
|
+
def thread_options_key; end
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
# Mutable map class which supports map merging
|
1511
|
+
#
|
1512
|
+
# @api public
|
1513
|
+
#
|
1514
|
+
# source://temple//lib/temple/map.rb#42
|
1515
|
+
class Temple::MutableMap < ::Temple::ImmutableMap
|
1516
|
+
# @api public
|
1517
|
+
# @return [MutableMap] a new instance of MutableMap
|
1518
|
+
#
|
1519
|
+
# source://temple//lib/temple/map.rb#43
|
1520
|
+
def initialize(*map); end
|
1521
|
+
|
1522
|
+
# @api public
|
1523
|
+
#
|
1524
|
+
# source://temple//lib/temple/map.rb#47
|
1525
|
+
def []=(key, value); end
|
1526
|
+
|
1527
|
+
# @api public
|
1528
|
+
#
|
1529
|
+
# source://temple//lib/temple/map.rb#51
|
1530
|
+
def update(map); end
|
1531
|
+
end
|
1532
|
+
|
1533
|
+
# source://temple//lib/temple/map.rb#56
|
1534
|
+
class Temple::OptionMap < ::Temple::MutableMap
|
1535
|
+
# @return [OptionMap] a new instance of OptionMap
|
1536
|
+
#
|
1537
|
+
# source://temple//lib/temple/map.rb#57
|
1538
|
+
def initialize(*map, &block); end
|
1539
|
+
|
1540
|
+
# source://temple//lib/temple/map.rb#64
|
1541
|
+
def []=(key, value); end
|
1542
|
+
|
1543
|
+
# source://temple//lib/temple/map.rb#83
|
1544
|
+
def add_deprecated_keys(*keys); end
|
1545
|
+
|
1546
|
+
# source://temple//lib/temple/map.rb#79
|
1547
|
+
def add_valid_keys(*keys); end
|
1548
|
+
|
1549
|
+
# @return [Boolean]
|
1550
|
+
#
|
1551
|
+
# source://temple//lib/temple/map.rb#96
|
1552
|
+
def deprecated_key?(key); end
|
1553
|
+
|
1554
|
+
# source://temple//lib/temple/map.rb#69
|
1555
|
+
def update(map); end
|
1556
|
+
|
1557
|
+
# @return [Boolean]
|
1558
|
+
#
|
1559
|
+
# source://temple//lib/temple/map.rb#101
|
1560
|
+
def valid_key?(key); end
|
1561
|
+
|
1562
|
+
# source://temple//lib/temple/map.rb#74
|
1563
|
+
def valid_keys; end
|
1564
|
+
|
1565
|
+
# source://temple//lib/temple/map.rb#91
|
1566
|
+
def validate_key!(key); end
|
1567
|
+
|
1568
|
+
# source://temple//lib/temple/map.rb#87
|
1569
|
+
def validate_map!(map); end
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
# Temple base parser
|
1573
|
+
#
|
1574
|
+
# @api public
|
1575
|
+
#
|
1576
|
+
# source://temple//lib/temple/parser.rb#5
|
1577
|
+
class Temple::Parser
|
1578
|
+
include ::Temple::Utils
|
1579
|
+
include ::Temple::Mixins::Options
|
1580
|
+
extend ::Temple::Mixins::ClassOptions
|
1581
|
+
extend ::Temple::Mixins::ThreadOptions
|
1582
|
+
end
|
1583
|
+
|
1584
|
+
# source://temple//lib/temple/static_analyzer.rb#8
|
1585
|
+
module Temple::StaticAnalyzer
|
1586
|
+
class << self
|
1587
|
+
# @return [Boolean]
|
1588
|
+
#
|
1589
|
+
# source://temple//lib/temple/static_analyzer.rb#33
|
1590
|
+
def available?; end
|
1591
|
+
|
1592
|
+
# @return [Boolean]
|
1593
|
+
#
|
1594
|
+
# source://temple//lib/temple/static_analyzer.rb#37
|
1595
|
+
def static?(code); end
|
1596
|
+
|
1597
|
+
# @return [Boolean]
|
1598
|
+
#
|
1599
|
+
# source://temple//lib/temple/static_analyzer.rb#58
|
1600
|
+
def syntax_error?(code); end
|
1601
|
+
end
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
# source://temple//lib/temple/static_analyzer.rb#20
|
1605
|
+
Temple::StaticAnalyzer::DYNAMIC_TOKENS = T.let(T.unsafe(nil), Array)
|
1606
|
+
|
1607
|
+
# source://temple//lib/temple/static_analyzer.rb#24
|
1608
|
+
Temple::StaticAnalyzer::STATIC_KEYWORDS = T.let(T.unsafe(nil), Array)
|
1609
|
+
|
1610
|
+
# source://temple//lib/temple/static_analyzer.rb#28
|
1611
|
+
Temple::StaticAnalyzer::STATIC_OPERATORS = T.let(T.unsafe(nil), Array)
|
1612
|
+
|
1613
|
+
# source://temple//lib/temple/static_analyzer.rb#9
|
1614
|
+
Temple::StaticAnalyzer::STATIC_TOKENS = T.let(T.unsafe(nil), Array)
|
1615
|
+
|
1616
|
+
# source://temple//lib/temple/static_analyzer.rb#67
|
1617
|
+
class Temple::StaticAnalyzer::SyntaxChecker < ::Ripper
|
1618
|
+
private
|
1619
|
+
|
1620
|
+
# @raise [ParseError]
|
1621
|
+
#
|
1622
|
+
# source://temple//lib/temple/static_analyzer.rb#72
|
1623
|
+
def on_parse_error(*_arg0); end
|
1624
|
+
end
|
1625
|
+
|
1626
|
+
# source://temple//lib/temple/static_analyzer.rb#68
|
1627
|
+
class Temple::StaticAnalyzer::SyntaxChecker::ParseError < ::StandardError; end
|
1628
|
+
|
1629
|
+
# @api public
|
1630
|
+
#
|
1631
|
+
# source://temple//lib/temple/templates.rb#4
|
1632
|
+
module Temple::Templates
|
1633
|
+
class << self
|
1634
|
+
# @api public
|
1635
|
+
#
|
1636
|
+
# source://temple//lib/temple/templates.rb#8
|
1637
|
+
def method_missing(name, engine, options = T.unsafe(nil)); end
|
1638
|
+
end
|
1639
|
+
end
|
1640
|
+
|
1641
|
+
# source://temple//lib/temple/templates/rails.rb#4
|
1642
|
+
class Temple::Templates::Rails
|
1643
|
+
extend ::Temple::Mixins::ClassOptions
|
1644
|
+
extend ::Temple::Mixins::Template
|
1645
|
+
|
1646
|
+
# source://temple//lib/temple/templates/rails.rb#7
|
1647
|
+
def call(template, source = T.unsafe(nil)); end
|
1648
|
+
|
1649
|
+
# @return [Boolean]
|
1650
|
+
#
|
1651
|
+
# source://temple//lib/temple/templates/rails.rb#16
|
1652
|
+
def supports_streaming?; end
|
1653
|
+
|
1654
|
+
class << self
|
1655
|
+
# source://temple//lib/temple/templates/rails.rb#20
|
1656
|
+
def register_as(*names); end
|
1657
|
+
end
|
1658
|
+
end
|
1659
|
+
|
1660
|
+
# source://temple//lib/temple/templates/tilt.rb#6
|
1661
|
+
class Temple::Templates::Tilt < ::Tilt::Template
|
1662
|
+
extend ::Temple::Mixins::ClassOptions
|
1663
|
+
extend ::Temple::Mixins::Template
|
1664
|
+
|
1665
|
+
# A string containing the (Ruby) source code for the template.
|
1666
|
+
#
|
1667
|
+
# @param locals [Hash] Local variables
|
1668
|
+
# @return [String] Compiled template ruby code
|
1669
|
+
#
|
1670
|
+
# source://temple//lib/temple/templates/tilt.rb#30
|
1671
|
+
def precompiled_template(locals = T.unsafe(nil)); end
|
1672
|
+
|
1673
|
+
# Prepare Temple template
|
1674
|
+
#
|
1675
|
+
# Called immediately after template data is loaded.
|
1676
|
+
#
|
1677
|
+
# @return [void]
|
1678
|
+
#
|
1679
|
+
# source://temple//lib/temple/templates/tilt.rb#16
|
1680
|
+
def prepare; end
|
1681
|
+
|
1682
|
+
class << self
|
1683
|
+
# source://temple//lib/temple/templates/tilt.rb#34
|
1684
|
+
def register_as(*names); end
|
1685
|
+
end
|
1686
|
+
end
|
1687
|
+
|
1688
|
+
# @api public
|
1689
|
+
#
|
1690
|
+
# source://temple//lib/temple/utils.rb#9
|
1691
|
+
module Temple::Utils
|
1692
|
+
extend ::Temple::Utils
|
1693
|
+
|
1694
|
+
# Check if expression is empty
|
1695
|
+
#
|
1696
|
+
# @api public
|
1697
|
+
# @param exp [Array] Temple expression
|
1698
|
+
# @return [Boolean] true if expression is empty
|
1699
|
+
#
|
1700
|
+
# source://temple//lib/temple/utils.rb#66
|
1701
|
+
def empty_exp?(exp); end
|
1702
|
+
|
1703
|
+
# Returns an escaped copy of `html`.
|
1704
|
+
#
|
1705
|
+
# @api public
|
1706
|
+
# @param html [String] The string to escape
|
1707
|
+
# @return [String] The escaped string
|
1708
|
+
#
|
1709
|
+
# source://temple//lib/temple/utils.rb#27
|
1710
|
+
def escape_html(html); end
|
1711
|
+
|
1712
|
+
# Returns an escaped copy of `html`.
|
1713
|
+
# Strings which are declared as html_safe are not escaped.
|
1714
|
+
#
|
1715
|
+
# @api public
|
1716
|
+
# @param html [String] The string to escape
|
1717
|
+
# @return [String] The escaped string
|
1718
|
+
#
|
1719
|
+
# source://temple//lib/temple/utils.rb#17
|
1720
|
+
def escape_html_safe(html); end
|
1721
|
+
|
1722
|
+
# @api public
|
1723
|
+
#
|
1724
|
+
# source://temple//lib/temple/utils.rb#77
|
1725
|
+
def indent_dynamic(text, indent_next, indent, pre_tags = T.unsafe(nil)); end
|
1726
|
+
|
1727
|
+
# Generate unique variable name
|
1728
|
+
#
|
1729
|
+
# @api public
|
1730
|
+
# @param prefix [String] Variable name prefix
|
1731
|
+
# @return [String] Variable name
|
1732
|
+
#
|
1733
|
+
# source://temple//lib/temple/utils.rb#56
|
1734
|
+
def unique_name(prefix = T.unsafe(nil)); end
|
1735
|
+
end
|
1736
|
+
|
1737
|
+
# source://temple//lib/temple/version.rb#3
|
1738
|
+
Temple::VERSION = T.let(T.unsafe(nil), String)
|