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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b7a8b8f154e4e7353ac87bbe7f87677a11b9b4d9fb92843cbe43d69f1ad55f6
4
- data.tar.gz: 33635b64c5b492dff53353d98d4c527948e716def4faa90ada74c880a77c9f4c
3
+ metadata.gz: 8544346549ebbc5186a149be6d0f777b8f004f2d078314b16a4d9a1ad8467bd3
4
+ data.tar.gz: cafc602a5d8e25f149cdb966033d95f4833ac061435ac165f6ffa8865baf28c7
5
5
  SHA512:
6
- metadata.gz: cba1da8161b7378a39f0c6f1f529e579e425938d942ceb9e327e7af815d9f59344473881f53cf06c8dba90ce4c978248a2f0222ee2f7f04fe20174aadf4bfc9a
7
- data.tar.gz: 7928f92a011a14e83c4a51e971467ad423f40a204ee7e1fc63b4c86e6c8619ab8aa842b1d13c7a8b2814ff49cd887f9e55d8ca0aace320f1601f8fcc3706ba4c
6
+ metadata.gz: a153bb6e926a94dca2634b7c69e99a40a6d393871ce9f915f8a77f7f9cecebb23e1e20dc22b785d49dbd59c5c55a4f2f69c7faf89e39093346281d1bd37162fe
7
+ data.tar.gz: fc357a3c2ad6f836d47bfaa9cf628149d191b15797a52f3bc19c1e2d59b54ec620e52585514a7b9f36922a23ae87e7989f1c455a4fd3e718b39087b22205ecd9
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yomise
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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 /xlsx$/ === path
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.0
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: 2023-11-25 00:00:00.000000000 Z
11
+ date: 2024-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daru