table_parser 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/table_parser.rb +1 -1
- data/lib/table_parser/parser.rb +2 -2
- metadata +4 -4
data/lib/table_parser.rb
CHANGED
data/lib/table_parser/parser.rb
CHANGED
@@ -8,8 +8,8 @@ module TableParser
|
|
8
8
|
def self.extract_table(doc, xpath)
|
9
9
|
rows = []
|
10
10
|
table = doc.xpath(xpath)
|
11
|
-
rows = table.xpath("./thead/tr|./tr").collect do |row|
|
12
|
-
row.xpath("./td|./th
|
11
|
+
rows = table.xpath("./thead/tr|./tr|./tbody/tr").collect do |row|
|
12
|
+
row.xpath("./td|./th").collect do |col|
|
13
13
|
col
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Francis Chong
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-06 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|