rexle-xpath 0.2.3 → 0.2.4

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: 7715f6fa6fed4841965fe1e1b72a32222f47a242
4
- data.tar.gz: 6c17c63d65f2c6b0ece0410ecbb63b2c021d1dfc
3
+ metadata.gz: 56c3c1b626fa5f482adbd5d13dc10dad57e440b9
4
+ data.tar.gz: 621610bb191c9a8491e371822880b945f6d06ee8
5
5
  SHA512:
6
- metadata.gz: 886a1cc9f4d53176fb1103f7dc57a849563330cb8d6fb7850c21b32573973fd58f9a406efb4e7abcdc3aeb7c5c93eafa289e7d5fac8f21cd27f31a19ef20cda5
7
- data.tar.gz: 7f70490345d52947f38424eda78b7321b01c91c4ce8e0afd9cc5c31509b01a5ca7224150f897ff4b59af23c76f9b63a150dd7b0348d4ea1ed2fb5dadb88c52cf
6
+ metadata.gz: e7eae6f2b5dbb49435ae69315dbbeab15f5b34dc5c3f11ba457882547eca55fa477b3dca261b383ca2425534a6aea486e70b43125e037576922b5d8d63bebc65
7
+ data.tar.gz: 660c00e8513daf7daba2dce186c1b63d2c17131ed452b56f4e5ef1375bee80de45c3b11524343e23bb0ed6e995eec0dd4b2697ddc792e0af9d7c109a92c2f5c1
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rexle-xpath.rb CHANGED
@@ -41,6 +41,13 @@ class RexleXPath
41
41
 
42
42
  private
43
43
 
44
+ def attribute(node, args, xpath_instructions)
45
+
46
+ key = args.first.to_sym
47
+ r = node.attributes[key]
48
+ r ? true : false
49
+ end
50
+
44
51
  def not(node, args, xpath_instructions)
45
52
 
46
53
  r = query node, xpath_instructions
@@ -55,7 +62,7 @@ class RexleXPath
55
62
 
56
63
  def select(node, args, xpath_instructions)
57
64
 
58
- a = node.select args.first
65
+ a = node.elements.select {|x| x.name == args.first }
59
66
 
60
67
  predicate = xpath_instructions.flatten.first.to_s == 'predicate'
61
68
 
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- j�؜�J�+8��� ��]/���zA��.Q����$���}23��2��K�jAQnoc0�m�Dh"5�ٕ��ޚ�o�P`��A��T���} o��2a������Tc)��̵���ʰ��2���@S�M}~AM��kbg�[�K]�V�6ϡ
2
- ⒖qL;�T��� ��S���_a6G�]C�=~����=�yʀ��/~���i8~DKL�sފOa��w �j���KhQ����HG,�\z��5���
1
+ ����qI����n�4q���ݮ���#xy��jlel^�
2
+ �.���uU��A4� 42Jk/���q˖�#~&K
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle-xpath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file