cellar 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cellar.rb +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e474bc4dc354fe4c5fff6e2381e33e068ceb17a58fec95658ecd333ac7077bc
4
- data.tar.gz: 540a05eaf9f6625240f4a27ccfd7956055466786ddf3e818a0c260e14a92eed0
3
+ metadata.gz: 3cec8c74c1ac06565b7f325100c42d170feaa8bcbd83734f713c3a4d721f0cbf
4
+ data.tar.gz: 3403ae1a85d904ffe717ce70e7a74e4bdaec3a9a95abb11e3aa72e499db4bb12
5
5
  SHA512:
6
- metadata.gz: 3ec873d0b0010c91e7b4bc0015b465a8866ae144aab223b6db5116c74a1e753cf9207713c9714eead2026c30d108883dfe1593812d0a197bf80ed7f35e0996db
7
- data.tar.gz: 27f2fc1462e97b3613411a1129976cb963e5b77df810b1c914e2886c21e8aee3f9a39e27e71bc21744a30a3c95ef6db8c912d4b2a8a010d077528cbbeb6959f7
6
+ metadata.gz: 8db25ee26837b86486b09db2e9bb4c763391c1c910f9e4a906659219ce6b88cccee20fec9e76f939e1835846fe9361e7a44082a40129b4fc9cc2103543e4962d
7
+ data.tar.gz: b80b8af43331bd3120fee05da3b51d31c7a8ad3ac6f4bcd5f7f107e8750d239b9151198dd07dcd60ba3f25b02fe98eaba21db689d3912f4c298bf40147174db7
data/lib/cellar.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # cellar - Ruby gem to deal with cells of data in rows and columns
3
3
  #
4
4
  # Author: Steve Shreeve (steve.shreeve@gmail.com)
5
- # Date: October 14, 2024
5
+ # Date: October 19, 2024
6
6
  #
7
7
  # TODO:
8
8
  # • Should we failover to empty strings like this: (value || "")
@@ -28,7 +28,7 @@ class Object
28
28
  end
29
29
 
30
30
  class Cellar
31
- VERSION="0.2.0"
31
+ VERSION="0.2.1"
32
32
 
33
33
  attr_reader :fields
34
34
  attr_reader :values
@@ -238,7 +238,11 @@ class Cellar
238
238
  field = data.fields[idx]
239
239
  index = index(field) || add_field(field)
240
240
  value = @values[index]
241
- @values[index] = block && !value.nil? ? block.call(value, val) : val
241
+ if block && !value.blank?
242
+ val = block.call(value, val)
243
+ next if val.blank?
244
+ end
245
+ @values[index] = val
242
246
  end
243
247
  self
244
248
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cellar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve