rggen-spreadsheet-loader 0.22.0 → 0.23.0

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: b5ce9ef2c15d7c9f7342f30ab32f262e6a94e2cc4d33e43a43ee9ecfed7a0246
4
- data.tar.gz: ed3b67e0e3e2da74eee1e4c747e0faf06db85884238d0438433bf7930dec5766
3
+ metadata.gz: 3e87a2a89331a6cae653d68ea608f4a12413c4c6a8f57ac1747c1491fb8fefa9
4
+ data.tar.gz: f8c2d6d7310451197d6b85dcc68847727bdbec781a3db67b609e7110a39f6ae8
5
5
  SHA512:
6
- metadata.gz: 95928dbd88bb525055d95c8f1de3fa8b4bb9852cb1ee170a96c78aa3673ffb3c959e9ca79779f02e8625571c5f1258edb2f865c76db103fd0ad3ddf67729bc98
7
- data.tar.gz: bc9aea1778d1e2a7a4b87d36fbdf68dfe5f571fcf9ff05fd28bbd1671d4b86833aa9e4408f2471ee315f0788f335f70e499330790dbe902749fe3a9d3f960654
6
+ metadata.gz: f195447df807071bc8f78ff900039a1f74e2e0382c8b9b037e97c25dd68e0ca44b9488b6982b41fa220acd4b1e43d120148fa2fba73f063e93079ac89283a810
7
+ data.tar.gz: 20c5d04ab6bc3a409943b6753c895c8f558a5bb1cf09e6d403c33b5283ec7cf2759db2b02118f5fb68e4d22b5a03110738115b212d15a85dc63cdfc7729b036c
@@ -4,13 +4,19 @@ module RgGen
4
4
  module SpreadsheetLoader
5
5
  module Spreadsheet
6
6
  class Cell < Core::InputBase::InputValue
7
- def initialize(row, column)
7
+ def initialize(value, row, column)
8
8
  position = Position.new(row.file, row.sheet, row.row, column)
9
- super(nil, position)
9
+ super(value, position)
10
10
  end
11
11
 
12
12
  alias_method :empty_cell?, :empty_value?
13
13
  end
14
+
15
+ class EmptyCell < Cell
16
+ def initialize(row, column)
17
+ super(nil, row, column)
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -16,12 +16,12 @@ module RgGen
16
16
  attr_reader :row
17
17
 
18
18
  def [](column)
19
- @cells[column] ||= Cell.new(self, column)
19
+ @cells[column] ||= EmptyCell.new(self, column)
20
20
  @cells[column]
21
21
  end
22
22
 
23
23
  def []=(column, value)
24
- self[column].value = value
24
+ @cells[column] = Cell.new(value, self, column)
25
25
  end
26
26
 
27
27
  def cells(from = 0, length = nil)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module SpreadsheetLoader
5
- VERSION = '0.22.0'
5
+ VERSION = '0.23.0'
6
6
  end
7
7
  end
@@ -16,7 +16,7 @@ module RgGen
16
16
  private
17
17
 
18
18
  def process_sheet(sheet, book)
19
- sheet.rows.size.positive? &&
19
+ sheet.rows.count.positive? &&
20
20
  book.add_sheet(sheet.name, sheet.rows)
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-spreadsheet-loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2022-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_xlsx_reader
@@ -112,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.3.3
115
+ rubygems_version: 3.3.7
116
116
  signing_key:
117
117
  specification_version: 4
118
- summary: rggen-spreadsheet-loader-0.22.0
118
+ summary: rggen-spreadsheet-loader-0.23.0
119
119
  test_files: []