dom 0.2.16 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dom.rb +3 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 379ce7980d1ed11e49521b48c858e1a4e567c2cd
4
- data.tar.gz: f63f47f113313d79fb1919d114bdbf2acafdf2ff
3
+ metadata.gz: 5c252d4f6fe8f7dcf998e49ba802d297f3302fb7
4
+ data.tar.gz: df860d914f779325d0e14328779a482eb1ffbed9
5
5
  SHA512:
6
- metadata.gz: a0b3bce2881a7076890fffd66b4769813e30628465198a157f5309dd4865b57e8d235abb4fe6fbadc90b0feacd8fb86fec501098708157960fd577af314589aa
7
- data.tar.gz: 8094e2aef25c98edd02db159f8b5c7b6115fa9ff0898c36e3281895a449b480e5cab2408d044f54ec2833fcb135d85a8b857197fc0a6badda3a27c6810e21455
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
- if obj = find{|e| e.kind_of?(String).!}
109
- raise "All array elements must be a string: #{obj}"
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])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawa