table_parser 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/table_parser/parser.rb +2 -2
- data/lib/table_parser.rb +1 -1
- metadata +3 -3
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("./tr").collect do |row|
|
12
|
-
row.xpath("./td|./th").collect do |col|
|
11
|
+
rows = table.xpath("./thead/tr|./tr").collect do |row|
|
12
|
+
row.xpath("./td|./th|./tbody/tr|./tbody/th").collect do |col|
|
13
13
|
col
|
14
14
|
end
|
15
15
|
end
|
data/lib/table_parser.rb
CHANGED
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: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Francis Chong
|