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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5dfbf880afd7cf30f4393f901b47364fb688467a9fd21c8b3744b5451800e29
4
- data.tar.gz: 71dc7ff36d7ecad701920ee854a393890803e865874843beac2ccd43a4821e8c
3
+ metadata.gz: dcec8f0bbdbd82f607ad92757884c10c46d211a4a70b04da1c86deb975ad75a8
4
+ data.tar.gz: 36a3cb261a42c2f03b51f92b90c260d095469e72d1fcfddc9c1c385d57bf9498
5
5
  SHA512:
6
- metadata.gz: '0569bd230d3d2ee69f0f1bd633f9de209c088578cf22b856e286ef392f1065925b166edf9c50dfd745b36df6dee31eec768f84d910bc5394f5169c217167edab'
7
- data.tar.gz: 28558bf8c44c074798656683d47a31400ad1bc5eed53efc1d8da38d635288834289a27f0d513b61cbe44d27477fb3f1a82991a6d0f536202e5dff0cbb40e5b20
6
+ metadata.gz: 0fe33a2786c62b44a6031bc8d7e9c7a5d1945277ea7ea6533cbfb8d7dfd021da96594f176303086fe94ef094fdecc48a3f002b1ae79347901b9fa0b3da667d15
7
+ data.tar.gz: d7cfe490a19f8d8aea7b246581cd87c880afecf785130d7a1bfa15fbccc9198da4c5769ab049c93aeaf52b22425bf57bb0258224b508faaedc92657e693c3606
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strum (0.0.32)
4
+ strum (0.0.33)
5
5
  dry-inflector (~> 0.2.0)
6
6
  dry-matcher (~> 0.8.2)
7
7
  thor (~> 0.20)
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(payload = nil, &block)
34
- new(payload).execute(&block)
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(payload)
39
+ def initialize(_input)
40
40
  self.strum_errors = {}
41
41
  self.outputs = {}
42
- self.payload = payload
43
- self.payload.freeze
44
- self.input = self.payload.dup
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 :payload, :input, :strum_errors, :outputs
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Strum
4
- VERSION = "0.0.32"
4
+ VERSION = "0.0.33"
5
5
  end
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.32
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-15 00:00:00.000000000 Z
11
+ date: 2020-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector