yomise 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/yomise/version.rb +1 -1
- data/lib/yomise.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8544346549ebbc5186a149be6d0f777b8f004f2d078314b16a4d9a1ad8467bd3
|
4
|
+
data.tar.gz: cafc602a5d8e25f149cdb966033d95f4833ac061435ac165f6ffa8865baf28c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a153bb6e926a94dca2634b7c69e99a40a6d393871ce9f915f8a77f7f9cecebb23e1e20dc22b785d49dbd59c5c55a4f2f69c7faf89e39093346281d1bd37162fe
|
7
|
+
data.tar.gz: fc357a3c2ad6f836d47bfaa9cf628149d191b15797a52f3bc19c1e2d59b54ec620e52585514a7b9f36922a23ae87e7989f1c455a4fd3e718b39087b22205ecd9
|
data/lib/yomise/version.rb
CHANGED
data/lib/yomise.rb
CHANGED
@@ -39,6 +39,10 @@ module Yomise
|
|
39
39
|
elsif format.to_s == "hash"
|
40
40
|
h, i = to_hash(csv, **opt)
|
41
41
|
return h
|
42
|
+
elsif format.to_s == "csv"
|
43
|
+
return csv.to_csv
|
44
|
+
elsif format.to_s == "numo"
|
45
|
+
return csv # Under Construction
|
42
46
|
else # include format.nil? (in this case, convert to Daru::DF).
|
43
47
|
|
44
48
|
h, ind_orig = to_hash(csv, index: index, **opt)
|
@@ -68,6 +72,10 @@ module Yomise
|
|
68
72
|
elsif format.to_s == "hash"
|
69
73
|
h, i = to_hash(a2d, **opt)
|
70
74
|
return h
|
75
|
+
elsif format.to_s == "csv"
|
76
|
+
return a2d.to_csv
|
77
|
+
elsif format.to_s == "numo"
|
78
|
+
return a2d # Under Construction
|
71
79
|
else # include format.nil?
|
72
80
|
h, ind_orig = to_hash(a2d, index: index, **opt)
|
73
81
|
ans = to_df(h, format: format)
|
@@ -148,7 +156,7 @@ module Yomise
|
|
148
156
|
|
149
157
|
# Genarate Array from excel file
|
150
158
|
def open_excel(path, sheet_i, encoding: "utf-8")
|
151
|
-
if /
|
159
|
+
if /xls(x|m)$/ === path
|
152
160
|
puts "Sorry, encoding option is not supported yet for xlsx file." if encoding != "utf-8"
|
153
161
|
|
154
162
|
book = Roo::Excelx.new(path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yomise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- showata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daru
|