interactor-initializer 1.1.1 → 1.2.0
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/interactor/initializer/helper.rb +9 -7
- data/lib/interactor/initializer/version.rb +1 -1
- data/lib/interactor/initializer.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: e4d09a6e72d6bf2916d4da84bb2c0b0db3b5bcafce4e0c212310ef08ca196605
|
4
|
+
data.tar.gz: c965f1464ede1eaf1daff6a8b8a60703a196074f6987abc3adbc67e4aa6a744a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d5cddeabd1a19537e500b700fb5337104741fff903cb1653ac9b9efc51f36ca2b7d4e170a490a2ef0c68f39925a33c60b53e9148e5e6e942634c9390cd6b9c4
|
7
|
+
data.tar.gz: 9a6889f3e12e258b2fa94efa5fabaf417327fa0873762e9a7cb622ff1509f9b764543fd7ba665fce46acf4071e7a2c86b2350b1ad91b6b269d136b541b4b531a
|
data/Gemfile.lock
CHANGED
@@ -24,18 +24,20 @@ class Interactor::Initializer::Helper
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def self.methods_with_params
|
27
|
+
def self.methods_with_params(attributes = [])
|
28
|
+
signature = attributes.join(', ')
|
29
|
+
|
28
30
|
<<-RUBY
|
29
|
-
def self.for(
|
30
|
-
new(
|
31
|
+
def self.for(#{signature})
|
32
|
+
new(#{signature}).run
|
31
33
|
end
|
32
34
|
|
33
|
-
def self.run(
|
34
|
-
new(
|
35
|
+
def self.run(#{signature})
|
36
|
+
new(#{signature}).run
|
35
37
|
end
|
36
38
|
|
37
|
-
def self.with(
|
38
|
-
new(
|
39
|
+
def self.with(#{signature})
|
40
|
+
new(#{signature}).run
|
39
41
|
end
|
40
42
|
RUBY
|
41
43
|
end
|
@@ -17,7 +17,7 @@ module Interactor
|
|
17
17
|
|
18
18
|
def initialize_with(*attributes)
|
19
19
|
signature = attributes.join(', ')
|
20
|
-
class_methods = Interactor::Initializer::Helper.methods_with_params
|
20
|
+
class_methods = Interactor::Initializer::Helper.methods_with_params(attributes)
|
21
21
|
|
22
22
|
Interactor::Initializer::Helper.modify_class(self, signature, attributes, class_methods)
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interactor-initializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Šarūnas Kūjalis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|