plutonium 0.18.6 → 0.18.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plutonium/models/has_cents.rb +4 -2
- data/lib/plutonium/version.rb +1 -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: b3bc75122683cce879de19c0ba79d14c3f47529c9ae8184f6cc1ef5e0f7ac533
|
4
|
+
data.tar.gz: 3af762cf2fd2ad8543d4bf3030ccaf5280549fc74491fc4427edf8cf258ed514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30c19b4400f82a0480d59fce7f45c47fbc021d61c7e1d67c9649d5bc445c335a112af0b0f83080a33bbdbf2a128bce6ea4470dda1ed9150a332202535d167b4c
|
7
|
+
data.tar.gz: d7aff561f705bd229113bada8b189b4000a483cc258e7f085bf4a016e7c48fd763f6e418ad06889491598ccfc449d818157634f360c064bf52a764d28fb4f3d0
|
@@ -143,8 +143,10 @@ module Plutonium
|
|
143
143
|
#
|
144
144
|
# @param value [Numeric, nil] The decimal value to be set.
|
145
145
|
def #{name}=(value)
|
146
|
-
self.#{cents_name} =
|
147
|
-
(BigDecimal(value.to_s) * #{rate}).to_i
|
146
|
+
self.#{cents_name} = begin
|
147
|
+
(BigDecimal(value.to_s) * #{rate}).to_i if value.present?
|
148
|
+
rescue ArgumentError
|
149
|
+
nil
|
148
150
|
end
|
149
151
|
end
|
150
152
|
|
data/lib/plutonium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plutonium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|