data_list_converter 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/lib/data_list_converter/types/xlsx_file.rb +5 -2
- data/lib/data_list_converter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f782ed47348f5746c2b97038cf5b4daea0f5426
|
4
|
+
data.tar.gz: 1c6e0f668c0b941a78e48eb3778e8f462d00e82b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98a5eb4d9bfcaf6aa51f88b564d18d248290d9fe7faa05df0623cc7a3769c0d2641b7eedcd1ec644d9850e9edcb29c888eae2475252e538e5e74ecf04d1413a
|
7
|
+
data.tar.gz: 667a130512fc88672d4d89097ac5febbcb7e124a9ed81c947b7dd4d471d07ccab8760dc1aeebd7a3568ed1e66318586e54e10d29104c291f0a3b351f7e5661d8
|
data/Rakefile
CHANGED
@@ -8,7 +8,9 @@ class DataListConverter
|
|
8
8
|
book = RubyXL::Parser.parse(input[:filename])
|
9
9
|
sheet = book.worksheets[input[:sheet] || 0]
|
10
10
|
sheet.each do |row|
|
11
|
-
|
11
|
+
next unless row
|
12
|
+
row_data = row.cells.map{|i| i.try(:value)}
|
13
|
+
block.call(row_data)
|
12
14
|
end
|
13
15
|
}
|
14
16
|
end
|
@@ -64,7 +66,8 @@ class DataListConverter
|
|
64
66
|
iterator = lambda { |&block|
|
65
67
|
sheet.each do |row|
|
66
68
|
next unless row
|
67
|
-
|
69
|
+
row_data = row.cells.map{|i| i.try(:value)}
|
70
|
+
block.call(row_data)
|
68
71
|
end
|
69
72
|
}
|
70
73
|
[sheet.sheet_name.to_sym, iterator]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_list_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linjunhalida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|