strum 0.0.32 → 0.0.33
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/strum/service.rb +8 -8
- data/lib/strum/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: dcec8f0bbdbd82f607ad92757884c10c46d211a4a70b04da1c86deb975ad75a8
|
4
|
+
data.tar.gz: 36a3cb261a42c2f03b51f92b90c260d095469e72d1fcfddc9c1c385d57bf9498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fe33a2786c62b44a6031bc8d7e9c7a5d1945277ea7ea6533cbfb8d7dfd021da96594f176303086fe94ef094fdecc48a3f002b1ae79347901b9fa0b3da667d15
|
7
|
+
data.tar.gz: d7cfe490a19f8d8aea7b246581cd87c880afecf785130d7a1bfa15fbccc9198da4c5769ab049c93aeaf52b22425bf57bb0258224b508faaedc92657e693c3606
|
data/Gemfile.lock
CHANGED
data/lib/strum/service.rb
CHANGED
@@ -30,18 +30,18 @@ module Strum
|
|
30
30
|
|
31
31
|
# Internal: Interactor class methods.
|
32
32
|
module ClassMethods
|
33
|
-
def call(
|
34
|
-
new(
|
33
|
+
def call(_input = nil, &block)
|
34
|
+
new(_input).execute(&block)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
# Instance methods
|
39
|
-
def initialize(
|
39
|
+
def initialize(_input)
|
40
40
|
self.strum_errors = {}
|
41
41
|
self.outputs = {}
|
42
|
-
self.
|
43
|
-
self.
|
44
|
-
self.input = self.
|
42
|
+
self._input = _input
|
43
|
+
self._input.freeze
|
44
|
+
self.input = self._input.dup
|
45
45
|
end
|
46
46
|
|
47
47
|
def execute(&block)
|
@@ -60,7 +60,7 @@ module Strum
|
|
60
60
|
|
61
61
|
protected
|
62
62
|
|
63
|
-
attr_accessor :
|
63
|
+
attr_accessor :_input, :input, :strum_errors, :outputs
|
64
64
|
|
65
65
|
def call
|
66
66
|
raise Failure, "call method must be implemented"
|
@@ -102,7 +102,7 @@ module Strum
|
|
102
102
|
|
103
103
|
def sliced(*keys)
|
104
104
|
if input.is_a?(Hash)
|
105
|
-
@input = input.slice(keys)
|
105
|
+
@input = input.slice(*keys)
|
106
106
|
else
|
107
107
|
add_error(:input, :must_be_hash)
|
108
108
|
end
|
data/lib/strum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Serhiy Nazarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|