easy_sheet_io 0.4.8 → 0.4.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/easy_sheet_io/version.rb +1 -1
- data/lib/easy_sheet_io.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c96b508dacc94ed1f5627c6a5b40f2282d08178a54b9114201d818a88752984d
|
4
|
+
data.tar.gz: 3b028f6e872d98c4f9dd5405a5a9278e439893270442a87d35d50823ae756e29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef3207db108cee37db118c5ec8e73b05bd43fd721f1a2685f88abf2e8a73d2ea780c42cdef37169b9bdfa221e7ca6afa53c67871f2e42e154b9f480e6b6a75b8
|
7
|
+
data.tar.gz: e3bc6a74cb7f4fca7602b5c4a9f1cb3d1eac21e35b492b0303080ee9fc700536b3fb0b7750b9ec1c8412203edca5e2579791926e02ec4f76fafbb168d11d3b0b
|
data/lib/easy_sheet_io.rb
CHANGED
@@ -93,7 +93,7 @@ module EasySheetIo
|
|
93
93
|
# -----------------------------
|
94
94
|
|
95
95
|
# Selecct Column---------------
|
96
|
-
output = output.map { _1[column_from...column_until] } column_from || column_until
|
96
|
+
output = output.map { _1[column_from...column_until] } if column_from || column_until
|
97
97
|
|
98
98
|
# Define Data Array------------
|
99
99
|
output_transpose = output[0].zip(*output[1..])
|
@@ -101,7 +101,13 @@ module EasySheetIo
|
|
101
101
|
# -----------------------------
|
102
102
|
|
103
103
|
# Define Header----------------
|
104
|
-
|
104
|
+
if header
|
105
|
+
hd = check_header(array2d[header])[column_from...column_until]
|
106
|
+
else
|
107
|
+
hd = [*0...(output.longest_line)].map{"column#{_1}"}
|
108
|
+
end
|
109
|
+
# hd = header.nil? ? [*0...(output.longest_line)].map{"column#{_1}"} : check_header(array2d[header])
|
110
|
+
|
105
111
|
hd = hd.map { _1.intern } if symbol_header
|
106
112
|
# -----------------------------
|
107
113
|
|