rexle 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 447d3c0e354b2dd98d2340af1932035eea229762
4
- data.tar.gz: ce371c091663a83a046d92bb6066871af4737e7c
3
+ metadata.gz: 02551cf709ab06d56b76cdfafeee11ef623911fb
4
+ data.tar.gz: 367e11bea0ac996b89798fad66db4fde93315234
5
5
  SHA512:
6
- metadata.gz: 0a96dab68ef3453f59e1ba6922e7dcef3b670cd87cb93154e692f529216ca6aa30e791fc581b3a79dc9cfca4ca50ac9660f645ec9c8b21c74e393053f81139e2
7
- data.tar.gz: 2481f073c40e905b066bf7e9090251a5394b4ee67b957e3f81bbcc775d8ebb40b3daa24bf8efaf7be43a2ae332e1e9ecee6ed9279639ba52252be503d0649e02
6
+ metadata.gz: 8c5dae689ec2e4b60703f03906e373cfea103dba6105d6da111504a89055a8f668a89beb10747c08eea3fbb0248da2bd6e68147f961920ff86b7f4dad3feff3c
7
+ data.tar.gz: f604154e457877a071fb52ca8588ed0238207d292817bc177a9d5f5b804e5bd247f97f112dff3410a26dc7c209c6c40b4e86cecb86179b1beb3f9f86c13f088e
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -17,6 +17,7 @@ include REXML
17
17
  # now displayed as self-closing tags.
18
18
  # An XPath containing a @class attribute is now
19
19
  # first validated against the element attribute existence
20
+ # Rexle::Element#attribute now checks the attributes type
20
21
  # 21-Oct-2014: partial feature: An Xpath containing //preceding-sibling and
21
22
  # //following-sibling now works
22
23
  # 19-Oct-2014: feature: An XPath containing the attribute @class is
@@ -669,8 +670,14 @@ class Rexle
669
670
  end
670
671
 
671
672
  def attribute(key)
673
+
672
674
  key = key.to_sym if key.is_a? String
673
- @attributes[key].gsub('&lt;','<').gsub('&gt;','>')
675
+
676
+ if @attributes[key].is_a? String then
677
+ @attributes[key].gsub('&lt;','<').gsub('&gt;','>')
678
+ else
679
+ @attributes[key]
680
+ end
674
681
  end
675
682
 
676
683
  def attributes() @attributes end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.31
4
+ version: 1.0.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file