dom 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dom.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c252d4f6fe8f7dcf998e49ba802d297f3302fb7
|
4
|
+
data.tar.gz: df860d914f779325d0e14328779a482eb1ffbed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f22cbb30d0c41a9b7b790713b47a2be420d9ed15043023c1b8e598b47711024b25eb10b086c6314cce8fb49ab801864294f541129333f3e2959006c5ed6cc1
|
7
|
+
data.tar.gz: 716ebb78b7255e9fff2749381954b35d7a368e7e58f493f8c4f3e221b0e77b66fcd510ef0149edb2ec4e7ce7bd9f4baf37261659b36b1eb230335253d572baab
|
data/lib/dom.rb
CHANGED
@@ -105,8 +105,9 @@ end
|
|
105
105
|
|
106
106
|
class Array
|
107
107
|
def dom tag, mounted: nil, **attr
|
108
|
-
|
109
|
-
|
108
|
+
error_objs = select{|e| e.kind_of?(String).!}
|
109
|
+
unless error_objs.empty?
|
110
|
+
raise "All array elements must be a string: #{error_objs.first}"
|
110
111
|
end
|
111
112
|
_tag = Dom.hyphenize(tag)
|
112
113
|
("<%s%s>%s</%s>".freeze % [_tag, Dom.attr(attr), Dom.join(self, tag), _tag])
|