callee 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/callee.rb +6 -6
- data/lib/callee/version.rb +1 -1
- 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: c378b7526324dd89ca9005eee46b5359d3391be9605fa8080f0598848701beb7
|
4
|
+
data.tar.gz: 756ad3fdddb500b8442405ccb9da602fe382e439f2f176e0703db1c0f83412ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4cc1e76eff81c7770366be5264d892f25128ff39d247adaba5f4594a48ff60679a0fe26dc2c2b8e8eab8b154448c62de61d7adba4379341aa4d9fa19883ed32
|
7
|
+
data.tar.gz: e22dcdd2b21a1f559d055f58ff1a18ea8c34a518333c7e9a4b4f18fbb9ed2fbe900eefb34a1d65ad51d416c92016feaeaa984b2336bbbd9cad5f5b207658655a
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.2.2] - 2019-08-07
|
8
|
+
|
9
|
+
- Fix nil param value handling.
|
10
|
+
|
7
11
|
## [0.2.1] - 2019-08-07
|
8
12
|
|
9
13
|
- `#call` method is now consistent with the way `Dry::Initializer` constructor accepts params and options.
|
data/Gemfile.lock
CHANGED
data/lib/callee.rb
CHANGED
@@ -19,12 +19,12 @@ module Callee
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def create_callable(params, options)
|
22
|
-
has_params = params.
|
23
|
-
has_options = options.
|
24
|
-
return new
|
25
|
-
return new(*params)
|
26
|
-
return new(**options)
|
27
|
-
new
|
22
|
+
has_params = !params.empty?
|
23
|
+
has_options = !options.empty?
|
24
|
+
return new(*params, **options) if has_params && has_options
|
25
|
+
return new(*params) if has_params
|
26
|
+
return new(**options) if has_options
|
27
|
+
new
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
data/lib/callee/version.rb
CHANGED