service_pattern 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/service_pattern/service.rb +7 -1
- data/lib/service_pattern/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: 63c1dea6c5ce4fe51b3e76f3d00d5ca1ae0ffe1606bd25e5bcb4015aa88b56bf
|
4
|
+
data.tar.gz: 99fcc5fe4cda47aab13599331717ea8c3f1781aa9889a2d1e208257de5c8cb16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b427f1b1346a9cf648a0366e0882c15244422b02e6cbeea637f23965ad74116f18427bf9df5c71c85e1f90aba61265925874d044bdd6b451d14cb44fc1e16bd7
|
7
|
+
data.tar.gz: ff393b3a73bb1951de6936005a95e47b248aecaf7ad1c96d3333bfc0d27eb422dc98c368b233e25f07e4846b49f824400331b5585ab0e77e21c1b9b1dffc56a5
|
@@ -63,7 +63,13 @@ class ServicePattern::Service
|
|
63
63
|
def initialize(**args)
|
64
64
|
arguments = self.class.instance_variable_get(:@arguments)
|
65
65
|
arguments&.each do |argument_name, argument_options|
|
66
|
-
|
66
|
+
next if args.key?(argument_name)
|
67
|
+
|
68
|
+
if argument_options.key?(:default)
|
69
|
+
__send__("#{argument_name}=", argument_options.fetch(:default))
|
70
|
+
else
|
71
|
+
raise ArgumentError, "missing keyword: #{argument_name}"
|
72
|
+
end
|
67
73
|
end
|
68
74
|
|
69
75
|
args.each do |key, value|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_pattern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|