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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e65974883f0073ff5143f8a036c9520b626a0cad96f0ee6ae34162fcd433321e
4
- data.tar.gz: 394938c7240e743fac49ceaf145f4abf05f8b6538bd60b273ecce892b6255bda
3
+ metadata.gz: c96b508dacc94ed1f5627c6a5b40f2282d08178a54b9114201d818a88752984d
4
+ data.tar.gz: 3b028f6e872d98c4f9dd5405a5a9278e439893270442a87d35d50823ae756e29
5
5
  SHA512:
6
- metadata.gz: 4c568bf3027c08cf2c1a404e5bf72314a776ba2f79a13e4e492928a44147189fd25f368cc454fd7e85aa011c6fa7707c84943629ad2e4c3c837efad0db6a9aaf
7
- data.tar.gz: e5505db874dd91ff7216d80b884e9ead751b9caeacd0e2fd07973ef2dcfc154ba57361d1d839e5f519f313cf7b6404730dfa3eca2a98c5d1c993d2d4b588f10e
6
+ metadata.gz: ef3207db108cee37db118c5ec8e73b05bd43fd721f1a2685f88abf2e8a73d2ea780c42cdef37169b9bdfa221e7ca6afa53c67871f2e42e154b9f480e6b6a75b8
7
+ data.tar.gz: e3bc6a74cb7f4fca7602b5c4a9f1cb3d1eac21e35b492b0303080ee9fc700536b3fb0b7750b9ec1c8412203edca5e2579791926e02ec4f76fafbb168d11d3b0b
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasySheetIo
4
- VERSION = "0.4.8"
4
+ VERSION = "0.4.8.2"
5
5
  end
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
- hd = header.nil? ? [*0...(output.longest_line)].map{"column#{_1}"} : check_header(array2d[header])
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_sheet_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - show-o-atakun