rexle 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. data/lib/rexle.rb +3 -9
  2. metadata +2 -2
@@ -53,17 +53,11 @@ class Rexle
53
53
 
54
54
  return_elements = @child_lookup.map.with_index.select {|x| x[0][0] == element_name}
55
55
 
56
- count = return_elements.length
57
- if count > 0 then
56
+ if return_elements.length > 0 then
58
57
  if a.empty? then
59
- if count == 1 then
60
- index = return_elements[0][-1]
61
- @child_elements[index]
62
- else
63
- return_elements.map{|x| @child_elements[x.last]}
64
- end
58
+ return_elements.map{|x| @child_elements[x.last]}
65
59
  else
66
- @child_elements[index].xpath a.join
60
+ return_elements.map{|x| @child_elements[x.last].xpath a.join}.flatten
67
61
  end
68
62
  end
69
63
  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: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-10-16 00:00:00 +01:00
12
+ date: 2010-10-17 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15