code-ruby 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/code/object/time.rb +3 -2
- data/lib/code/version.rb +1 -1
- data/spec/code_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7027d0ca2225f4adf54f980dd7d08b7fa07c10c40c7e04b8e67e651a300f77b7
|
4
|
+
data.tar.gz: f652f053f3bb7710629deea3ad6cb0684c6117f1475cace386c4ea5005649eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ecea3358e470e50cb5571c0c5094837a1eb7fd68043e803d18dc3b691686e246cc0cb93a1a89fd4fbe1448b0dc45841883e4938b8510f9df6d45d7091d57447
|
7
|
+
data.tar.gz: 3c0d475b0420dd3a937dd0f2dcff648bc2d1924b0639415c3096e79429dda1e787579a684aa3ce8b236739b590f72ebfb2049c901224288fadfca4ce25c5c183
|
data/Gemfile.lock
CHANGED
data/lib/code/object/time.rb
CHANGED
@@ -7,9 +7,10 @@ class Code
|
|
7
7
|
|
8
8
|
def initialize(*args, **_kargs, &_block)
|
9
9
|
::Time.zone ||= DEFAULT_ZONE
|
10
|
-
raw = args.first
|
10
|
+
raw = args.first
|
11
11
|
raw = raw.raw if raw.is_an?(Object)
|
12
|
-
|
12
|
+
raw = raw.presence || ::Time.zone.now
|
13
|
+
@raw = ::Time.zone.parse(raw.to_s).presence || ::Time.zone.now
|
13
14
|
end
|
14
15
|
|
15
16
|
def self.call(**args)
|
data/lib/code/version.rb
CHANGED
data/spec/code_spec.rb
CHANGED