phlex 1.6.3 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of phlex might be problematic. Click here for more details.

@@ -4,386 +4,450 @@ module Phlex::SVG::StandardElements
4
4
  extend Phlex::Elements
5
5
 
6
6
  # @!method a(**attributes, &content)
7
- # Outputs an <code>a</code> tag
7
+ # Outputs an `<a>` tag.
8
8
  # @return [nil]
9
+ # @yieldparam component [self]
9
10
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/a
10
11
  register_element :a, tag: "a"
11
12
 
12
13
  # @!method animate(**attributes, &content)
13
- # Outputs an <code>animate</code> tag
14
+ # Outputs an `<animate>` tag.
14
15
  # @return [nil]
16
+ # @yieldparam component [self]
15
17
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/animate
16
18
  register_element :animate, tag: "animate"
17
19
 
18
20
  # @!method animateMotion(**attributes, &content)
19
- # Outputs an <code>animateMotion</code> tag
21
+ # Outputs an `<animateMotion>` tag.
20
22
  # @return [nil]
23
+ # @yieldparam component [self]
21
24
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/animateMotion
22
25
  register_element :animateMotion, tag: "animateMotion"
23
26
 
24
27
  # @!method animateTransform(**attributes, &content)
25
- # Outputs an <code>animateTransform</code> tag
28
+ # Outputs an `<animateTransform>` tag.
26
29
  # @return [nil]
30
+ # @yieldparam component [self]
27
31
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/animateTransform
28
32
  register_element :animateTransform, tag: "animateTransform"
29
33
 
30
34
  # @!method circle(**attributes, &content)
31
- # Outputs an <code>circle</code> tag
35
+ # Outputs a `<circle>` tag.
32
36
  # @return [nil]
37
+ # @yieldparam component [self]
33
38
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/circle
34
39
  register_element :circle, tag: "circle"
35
40
 
36
41
  # @!method clipPath(**attributes, &content)
37
- # Outputs an <code>clipPath</code> tag
42
+ # Outputs a `<clipPath>` tag.
38
43
  # @return [nil]
44
+ # @yieldparam component [self]
39
45
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/clipPath
40
46
  register_element :clipPath, tag: "clipPath"
41
47
 
42
48
  # @!method defs(**attributes, &content)
43
- # Outputs an <code>defs</code> tag
49
+ # Outputs a `<defs>` tag.
44
50
  # @return [nil]
51
+ # @yieldparam component [self]
45
52
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/defs
46
53
  register_element :defs, tag: "defs"
47
54
 
48
55
  # @!method desc(**attributes, &content)
49
- # Outputs an <code>desc</code> tag
56
+ # Outputs a `<desc>` tag.
50
57
  # @return [nil]
58
+ # @yieldparam component [self]
51
59
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/desc
52
60
  register_element :desc, tag: "desc"
53
61
 
54
62
  # @!method discard(**attributes, &content)
55
- # Outputs an <code>discard</code> tag
63
+ # Outputs a `<discard>` tag.
56
64
  # @return [nil]
65
+ # @yieldparam component [self]
57
66
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/discard
58
67
  register_element :discard, tag: "discard"
59
68
 
60
69
  # @!method ellipse(**attributes, &content)
61
- # Outputs an <code>ellipse</code> tag
70
+ # Outputs an `<ellipse>` tag.
62
71
  # @return [nil]
72
+ # @yieldparam component [self]
63
73
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/ellipse
64
74
  register_element :ellipse, tag: "ellipse"
65
75
 
66
76
  # @!method feBlend(**attributes, &content)
67
- # Outputs an <code>feBlend</code> tag
77
+ # Outputs a `<feBlend>` tag.
68
78
  # @return [nil]
79
+ # @yieldparam component [self]
69
80
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feBlend
70
81
  register_element :feBlend, tag: "feBlend"
71
82
 
72
83
  # @!method feColorMatrix(**attributes, &content)
73
- # Outputs an <code>feColorMatrix</code> tag
84
+ # Outputs a `<feColorMatrix>` tag.
74
85
  # @return [nil]
86
+ # @yieldparam component [self]
75
87
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feColorMatrix
76
88
  register_element :feColorMatrix, tag: "feColorMatrix"
77
89
 
78
90
  # @!method feComponentTransfer(**attributes, &content)
79
- # Outputs an <code>feComponentTransfer</code> tag
91
+ # Outputs a `<feComponentTransfer>` tag.
80
92
  # @return [nil]
93
+ # @yieldparam component [self]
81
94
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feComponentTransfer
82
95
  register_element :feComponentTransfer, tag: "feComponentTransfer"
83
96
 
84
97
  # @!method feComposite(**attributes, &content)
85
- # Outputs an <code>feComposite</code> tag
98
+ # Outputs a `<feComposite>` tag.
86
99
  # @return [nil]
100
+ # @yieldparam component [self]
87
101
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feComposite
88
102
  register_element :feComposite, tag: "feComposite"
89
103
 
90
104
  # @!method feConvolveMatrix(**attributes, &content)
91
- # Outputs an <code>feConvolveMatrix</code> tag
105
+ # Outputs a `<feConvolveMatrix>` tag.
92
106
  # @return [nil]
107
+ # @yieldparam component [self]
93
108
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feConvolveMatrix
94
109
  register_element :feConvolveMatrix, tag: "feConvolveMatrix"
95
110
 
96
111
  # @!method feDiffuseLighting(**attributes, &content)
97
- # Outputs an <code>feDiffuseLighting</code> tag
112
+ # Outputs a `<feDiffuseLighting>` tag.
98
113
  # @return [nil]
114
+ # @yieldparam component [self]
99
115
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feDiffuseLighting
100
116
  register_element :feDiffuseLighting, tag: "feDiffuseLighting"
101
117
 
102
118
  # @!method feDisplacementMap(**attributes, &content)
103
- # Outputs an <code>feDisplacementMap</code> tag
119
+ # Outputs a `<feDisplacementMap>` tag.
104
120
  # @return [nil]
121
+ # @yieldparam component [self]
105
122
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feDisplacementMap
106
123
  register_element :feDisplacementMap, tag: "feDisplacementMap"
107
124
 
108
125
  # @!method feDistantLight(**attributes, &content)
109
- # Outputs an <code>feDistantLight</code> tag
126
+ # Outputs a `<feDistantLight>` tag.
110
127
  # @return [nil]
128
+ # @yieldparam component [self]
111
129
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feDistantLight
112
130
  register_element :feDistantLight, tag: "feDistantLight"
113
131
 
114
132
  # @!method feDropShadow(**attributes, &content)
115
- # Outputs an <code>feDropShadow</code> tag
133
+ # Outputs a `<feDropShadow>` tag.
116
134
  # @return [nil]
135
+ # @yieldparam component [self]
117
136
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feDropShadow
118
137
  register_element :feDropShadow, tag: "feDropShadow"
119
138
 
120
139
  # @!method feFlood(**attributes, &content)
121
- # Outputs an <code>feFlood</code> tag
140
+ # Outputs a `<feFlood>` tag.
122
141
  # @return [nil]
142
+ # @yieldparam component [self]
123
143
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feFlood
124
144
  register_element :feFlood, tag: "feFlood"
125
145
 
126
146
  # @!method feFuncA(**attributes, &content)
127
- # Outputs an <code>feFuncA</code> tag
147
+ # Outputs a `<feFuncA>` tag.
128
148
  # @return [nil]
149
+ # @yieldparam component [self]
129
150
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncA
130
151
  register_element :feFuncA, tag: "feFuncA"
131
152
 
132
153
  # @!method feFuncB(**attributes, &content)
133
- # Outputs an <code>feFuncB</code> tag
154
+ # Outputs a `<feFuncB>` tag.
134
155
  # @return [nil]
156
+ # @yieldparam component [self]
135
157
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncB
136
158
  register_element :feFuncB, tag: "feFuncB"
137
159
 
138
160
  # @!method feFuncG(**attributes, &content)
139
- # Outputs an <code>feFuncG</code> tag
161
+ # Outputs a `<feFuncG>` tag.
140
162
  # @return [nil]
163
+ # @yieldparam component [self]
141
164
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncG
142
165
  register_element :feFuncG, tag: "feFuncG"
143
166
 
144
167
  # @!method feFuncR(**attributes, &content)
145
- # Outputs an <code>feFuncR</code> tag
168
+ # Outputs a `<feFuncR>` tag.
146
169
  # @return [nil]
170
+ # @yieldparam component [self]
147
171
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncR
148
172
  register_element :feFuncR, tag: "feFuncR"
149
173
 
150
174
  # @!method feGaussianBlur(**attributes, &content)
151
- # Outputs an <code>feGaussianBlur</code> tag
175
+ # Outputs a `<feGaussianBlur>` tag.
152
176
  # @return [nil]
177
+ # @yieldparam component [self]
153
178
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feGaussianBlur
154
179
  register_element :feGaussianBlur, tag: "feGaussianBlur"
155
180
 
156
181
  # @!method feImage(**attributes, &content)
157
- # Outputs an <code>feImage</code> tag
182
+ # Outputs a `<feImage>` tag.
158
183
  # @return [nil]
184
+ # @yieldparam component [self]
159
185
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feImage
160
186
  register_element :feImage, tag: "feImage"
161
187
 
162
188
  # @!method feMerge(**attributes, &content)
163
- # Outputs an <code>feMerge</code> tag
189
+ # Outputs a `<feMerge>` tag.
164
190
  # @return [nil]
191
+ # @yieldparam component [self]
165
192
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feMerge
166
193
  register_element :feMerge, tag: "feMerge"
167
194
 
168
195
  # @!method feMergeNode(**attributes, &content)
169
- # Outputs an <code>feMergeNode</code> tag
196
+ # Outputs a `<feMergeNode>` tag.
170
197
  # @return [nil]
198
+ # @yieldparam component [self]
171
199
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feMergeNode
172
200
  register_element :feMergeNode, tag: "feMergeNode"
173
201
 
174
202
  # @!method feMorphology(**attributes, &content)
175
- # Outputs an <code>feMorphology</code> tag
203
+ # Outputs a `<feMorphology>` tag.
176
204
  # @return [nil]
205
+ # @yieldparam component [self]
177
206
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feMorphology
178
207
  register_element :feMorphology, tag: "feMorphology"
179
208
 
180
209
  # @!method feOffset(**attributes, &content)
181
- # Outputs an <code>feOffset</code> tag
210
+ # Outputs a `<feOffset>` tag.
182
211
  # @return [nil]
212
+ # @yieldparam component [self]
183
213
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feOffset
184
214
  register_element :feOffset, tag: "feOffset"
185
215
 
186
216
  # @!method fePointLight(**attributes, &content)
187
- # Outputs an <code>fePointLight</code> tag
217
+ # Outputs a `<fePointLight>` tag.
188
218
  # @return [nil]
219
+ # @yieldparam component [self]
189
220
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/fePointLight
190
221
  register_element :fePointLight, tag: "fePointLight"
191
222
 
192
223
  # @!method feSpecularLighting(**attributes, &content)
193
- # Outputs an <code>feSpecularLighting</code> tag
224
+ # Outputs a `<feSpecularLighting>` tag.
194
225
  # @return [nil]
226
+ # @yieldparam component [self]
195
227
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feSpecularLighting
196
228
  register_element :feSpecularLighting, tag: "feSpecularLighting"
197
229
 
198
230
  # @!method feSpotLight(**attributes, &content)
199
- # Outputs an <code>feSpotLight</code> tag
231
+ # Outputs a `<feSpotLight>` tag.
200
232
  # @return [nil]
233
+ # @yieldparam component [self]
201
234
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feSpotLight
202
235
  register_element :feSpotLight, tag: "feSpotLight"
203
236
 
204
237
  # @!method feTile(**attributes, &content)
205
- # Outputs an <code>feTile</code> tag
238
+ # Outputs a `<feTile>` tag.
206
239
  # @return [nil]
240
+ # @yieldparam component [self]
207
241
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feTile
208
242
  register_element :feTile, tag: "feTile"
209
243
 
210
244
  # @!method feTurbulence(**attributes, &content)
211
- # Outputs an <code>feTurbulence</code> tag
245
+ # Outputs a `<feTurbulence>` tag.
212
246
  # @return [nil]
247
+ # @yieldparam component [self]
213
248
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/feTurbulence
214
249
  register_element :feTurbulence, tag: "feTurbulence"
215
250
 
216
251
  # @!method filter(**attributes, &content)
217
- # Outputs an <code>filter</code> tag
252
+ # Outputs a `<filter>` tag.
218
253
  # @return [nil]
254
+ # @yieldparam component [self]
219
255
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/filter
220
256
  register_element :filter, tag: "filter"
221
257
 
222
258
  # @!method foreignObject(**attributes, &content)
223
- # Outputs an <code>foreignObject</code> tag
259
+ # Outputs a `<foreignObject>` tag.
224
260
  # @return [nil]
261
+ # @yieldparam component [self]
225
262
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/foreignObject
226
263
  register_element :foreignObject, tag: "foreignObject"
227
264
 
228
265
  # @!method g(**attributes, &content)
229
- # Outputs an <code>g</code> tag
266
+ # Outputs a `<g>` tag.
230
267
  # @return [nil]
268
+ # @yieldparam component [self]
231
269
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/g
232
270
  register_element :g, tag: "g"
233
271
 
234
272
  # @!method image(**attributes, &content)
235
- # Outputs an <code>image</code> tag
273
+ # Outputs an `<image>` tag.
236
274
  # @return [nil]
275
+ # @yieldparam component [self]
237
276
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/image
238
277
  register_element :image, tag: "image"
239
278
 
240
279
  # @!method line(**attributes, &content)
241
- # Outputs an <code>line</code> tag
280
+ # Outputs a `<line>` tag.
242
281
  # @return [nil]
282
+ # @yieldparam component [self]
243
283
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/line
244
284
  register_element :line, tag: "line"
245
285
 
246
286
  # @!method linearGradient(**attributes, &content)
247
- # Outputs an <code>linearGradient</code> tag
287
+ # Outputs a `<linearGradient>` tag.
248
288
  # @return [nil]
289
+ # @yieldparam component [self]
249
290
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/linearGradient
250
291
  register_element :linearGradient, tag: "linearGradient"
251
292
 
252
293
  # @!method marker(**attributes, &content)
253
- # Outputs an <code>marker</code> tag
294
+ # Outputs a `<marker>` tag.
254
295
  # @return [nil]
296
+ # @yieldparam component [self]
255
297
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/marker
256
298
  register_element :marker, tag: "marker"
257
299
 
258
300
  # @!method mask(**attributes, &content)
259
- # Outputs an <code>mask</code> tag
301
+ # Outputs a `<mask>` tag.
260
302
  # @return [nil]
303
+ # @yieldparam component [self]
261
304
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/mask
262
305
  register_element :mask, tag: "mask"
263
306
 
264
307
  # @!method metadata(**attributes, &content)
265
- # Outputs an <code>metadata</code> tag
308
+ # Outputs a `<metadata>` tag.
266
309
  # @return [nil]
310
+ # @yieldparam component [self]
267
311
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/metadata
268
312
  register_element :metadata, tag: "metadata"
269
313
 
270
314
  # @!method mpath(**attributes, &content)
271
- # Outputs an <code>mpath</code> tag
315
+ # Outputs an `<mpath>` tag.
272
316
  # @return [nil]
317
+ # @yieldparam component [self]
273
318
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/mpath
274
319
  register_element :mpath, tag: "mpath"
275
320
 
276
321
  # @!method path(**attributes, &content)
277
- # Outputs an <code>path</code> tag
322
+ # Outputs a `<path>` tag.
278
323
  # @return [nil]
324
+ # @yieldparam component [self]
279
325
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/path
280
326
  register_element :path, tag: "path"
281
327
 
282
328
  # @!method pattern(**attributes, &content)
283
- # Outputs an <code>pattern</code> tag
329
+ # Outputs a `<pattern>` tag.
284
330
  # @return [nil]
331
+ # @yieldparam component [self]
285
332
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/pattern
286
333
  register_element :pattern, tag: "pattern"
287
334
 
288
335
  # @!method polygon(**attributes, &content)
289
- # Outputs an <code>polygon</code> tag
336
+ # Outputs a `<polygon>` tag.
290
337
  # @return [nil]
338
+ # @yieldparam component [self]
291
339
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/polygon
292
340
  register_element :polygon, tag: "polygon"
293
341
 
294
342
  # @!method polyline(**attributes, &content)
295
- # Outputs an <code>polyline</code> tag
343
+ # Outputs a `<polyline>` tag.
296
344
  # @return [nil]
345
+ # @yieldparam component [self]
297
346
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/polyline
298
347
  register_element :polyline, tag: "polyline"
299
348
 
300
349
  # @!method radialGradient(**attributes, &content)
301
- # Outputs an <code>radialGradient</code> tag
350
+ # Outputs a `<radialGradient>` tag.
302
351
  # @return [nil]
352
+ # @yieldparam component [self]
303
353
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/radialGradient
304
354
  register_element :radialGradient, tag: "radialGradient"
305
355
 
306
356
  # @!method rect(**attributes, &content)
307
- # Outputs an <code>rect</code> tag
357
+ # Outputs a `<rect>` tag.
308
358
  # @return [nil]
359
+ # @yieldparam component [self]
309
360
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/rect
310
361
  register_element :rect, tag: "rect"
311
362
 
312
363
  # @!method script(**attributes, &content)
313
- # Outputs an <code>script</code> tag
364
+ # Outputs a `<script>` tag.
314
365
  # @return [nil]
366
+ # @yieldparam component [self]
315
367
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/script
316
368
  register_element :script, tag: "script"
317
369
 
318
370
  # @!method set(**attributes, &content)
319
- # Outputs an <code>set</code> tag
371
+ # Outputs a `<set>` tag.
320
372
  # @return [nil]
373
+ # @yieldparam component [self]
321
374
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/set
322
375
  register_element :set, tag: "set"
323
376
 
324
377
  # @!method stop(**attributes, &content)
325
- # Outputs an <code>stop</code> tag
378
+ # Outputs a `<stop>` tag.
326
379
  # @return [nil]
380
+ # @yieldparam component [self]
327
381
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/stop
328
382
  register_element :stop, tag: "stop"
329
383
 
330
384
  # @!method style(**attributes, &content)
331
- # Outputs an <code>style</code> tag
385
+ # Outputs a `<style>` tag.
332
386
  # @return [nil]
387
+ # @yieldparam component [self]
333
388
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/style
334
389
  register_element :style, tag: "style"
335
390
 
336
391
  # @!method svg(**attributes, &content)
337
- # Outputs an <code>svg</code> tag
392
+ # Outputs an `<svg>` tag.
338
393
  # @return [nil]
394
+ # @yieldparam component [self]
339
395
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/svg
340
396
  register_element :svg, tag: "svg"
341
397
 
342
398
  # @!method switch(**attributes, &content)
343
- # Outputs an <code>switch</code> tag
399
+ # Outputs a `<switch>` tag.
344
400
  # @return [nil]
401
+ # @yieldparam component [self]
345
402
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/switch
346
403
  register_element :switch, tag: "switch"
347
404
 
348
405
  # @!method symbol(**attributes, &content)
349
- # Outputs an <code>symbol</code> tag
406
+ # Outputs a `<symbol>` tag.
350
407
  # @return [nil]
408
+ # @yieldparam component [self]
351
409
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/symbol
352
410
  register_element :symbol, tag: "symbol"
353
411
 
354
412
  # @!method text(**attributes, &content)
355
- # Outputs an <code>text</code> tag
413
+ # Outputs a `<text>` tag.
356
414
  # @return [nil]
415
+ # @yieldparam component [self]
357
416
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/text
358
417
  register_element :text, tag: "text"
359
418
 
360
419
  # @!method textPath(**attributes, &content)
361
- # Outputs an <code>textPath</code> tag
420
+ # Outputs a `<textPath>` tag.
362
421
  # @return [nil]
422
+ # @yieldparam component [self]
363
423
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/textPath
364
424
  register_element :textPath, tag: "textPath"
365
425
 
366
426
  # @!method title(**attributes, &content)
367
- # Outputs an <code>title</code> tag
427
+ # Outputs a `<title>` tag.
368
428
  # @return [nil]
429
+ # @yieldparam component [self]
369
430
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/title
370
431
  register_element :title, tag: "title"
371
432
 
372
433
  # @!method tspan(**attributes, &content)
373
- # Outputs an <code>tspan</code> tag
434
+ # Outputs a `<tspan>` tag.
374
435
  # @return [nil]
436
+ # @yieldparam component [self]
375
437
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/tspan
376
438
  register_element :tspan, tag: "tspan"
377
439
 
378
440
  # @!method use(**attributes, &content)
379
- # Outputs an <code>use</code> tag
441
+ # Outputs a `<use>` tag.
380
442
  # @return [nil]
443
+ # @yieldparam component [self]
381
444
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/use
382
445
  register_element :use, tag: "use"
383
446
 
384
447
  # @!method view(**attributes, &content)
385
- # Outputs an <code>view</code> tag
448
+ # Outputs a `<view>` tag.
386
449
  # @return [nil]
450
+ # @yieldparam component [self]
387
451
  # @see https://developer.mozilla.org/docs/Web/SVG/Element/view
388
452
  register_element :view, tag: "view"
389
453
  end
data/lib/phlex/svg.rb CHANGED
@@ -4,10 +4,6 @@ module Phlex
4
4
  class SVG < SGML
5
5
  include StandardElements
6
6
 
7
- def template
8
- yield
9
- end
10
-
11
7
  # This should be extended after all method definitions
12
8
  extend ElementClobberingGuard
13
9
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # @api private
3
4
  class Phlex::Unbuffered < BasicObject
4
5
  def initialize(object)
5
6
  @object = object
data/lib/phlex/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Phlex
4
- VERSION = "1.6.3"
4
+ VERSION = "1.7.0"
5
5
  end
data/lib/phlex.rb CHANGED
@@ -5,19 +5,32 @@ require "zeitwerk"
5
5
  require "concurrent"
6
6
 
7
7
  module Phlex
8
+ # Included in all Phlex exceptions allowing you to match any Phlex error.
9
+ # @example Rescue any Phlex error:
10
+ # rescue Phlex::Error
11
+ module Error; end
12
+
13
+ # A specialised ArgumentError for Phlex.
14
+ class ArgumentError < ::ArgumentError
15
+ include Error
16
+ end
17
+
18
+ # A specialised NameError for Phlex.
19
+ class NameError < ::NameError
20
+ include Error
21
+ end
22
+
23
+ # @api private
8
24
  Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
9
25
  loader.inflector.inflect(
10
26
  "html" => "HTML",
11
- "svg" => "SVG",
12
- "sgml" => "SGML"
27
+ "svg" => "SVG",
28
+ "sgml" => "SGML"
13
29
  )
14
30
  loader.ignore("#{__dir__}/phlex/testing")
15
31
  loader.setup
16
32
  end
17
33
 
18
- Error = Module.new
19
- ArgumentError = Class.new(ArgumentError) { include Error }
20
- NameError = Class.new(NameError) { include Error }
21
-
34
+ # @api private
22
35
  ATTRIBUTE_CACHE = Concurrent::Map.new
23
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Drapper
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-17 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.6'
55
- description: A high-performance view framework optimised for developer happiness.
55
+ description: A high-performance view framework optimised for fun.
56
56
  email:
57
57
  - joel@drapper.me
58
58
  executables: []
@@ -62,6 +62,8 @@ files:
62
62
  - ".editorconfig"
63
63
  - ".rubocop.yml"
64
64
  - ".ruby-version"
65
+ - ".yardopts"
66
+ - CHANGELOG.md
65
67
  - CODE_OF_CONDUCT.md
66
68
  - CONTRIBUTING.md
67
69
  - Gemfile
@@ -98,8 +100,8 @@ licenses:
98
100
  - MIT
99
101
  metadata:
100
102
  homepage_uri: https://www.phlex.fun
101
- source_code_uri: https://github.com/joeldrapper/phlex
102
- changelog_uri: https://github.com/joeldrapper/phlex/releases
103
+ source_code_uri: https://github.com/phlex-ruby/phlex
104
+ changelog_uri: https://github.com/phlex-ruby/phlex/blob/main/CHANGELOG.md
103
105
  funding_uri: https://github.com/sponsors/joeldrapper
104
106
  rubygems_mfa_required: 'true'
105
107
  post_install_message:
@@ -117,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
119
  - !ruby/object:Gem::Version
118
120
  version: '0'
119
121
  requirements: []
120
- rubygems_version: 3.5.9
122
+ rubygems_version: 3.4.10
121
123
  signing_key:
122
124
  specification_version: 4
123
- summary: A framework for building views in Ruby.
125
+ summary: A fun framework for building views in Ruby.
124
126
  test_files: []