remap 2.1.20 → 2.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/remap/base.rb +2 -2
- data/lib/remap/contract.rb +2 -2
- 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: 6059a8e8a4e40adb0f1db63ef878bb3a709bc89762d0bb8c5966095eede375e4
|
4
|
+
data.tar.gz: 8171ccc4cde280b094b63bab9ab03083ef6ad4ecffe96782288ebddd645b17b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 057c64e1bea9e32c0b8217c95396092e0c7b7fec328c865a9b35edb5dad2861cd9e4cd51b7f4e80297e2d7aed26f60127dea1d699723630816a7c9ad0a4f9a13
|
7
|
+
data.tar.gz: 37b33ecd641d500b0a5dfaf642b9ceb9a6d17af2030583427f49e7536e6200b6122e4fff3ef7088118b2bd0ee2f8009f79ab716362ac0457158a1b1506522800
|
data/lib/remap/base.rb
CHANGED
@@ -110,7 +110,7 @@ module Remap
|
|
110
110
|
extend Operation
|
111
111
|
|
112
112
|
with_options instance_accessor: true do |scope|
|
113
|
-
scope.config_accessor(:contract) { Dry::Schema.
|
113
|
+
scope.config_accessor(:contract) { Dry::Schema.define {} }
|
114
114
|
scope.config_accessor(:constructor) { IDENTITY }
|
115
115
|
scope.config_accessor(:options) { EMPTY_ARRAY }
|
116
116
|
scope.config_accessor(:option) { EMPTY_HASH }
|
@@ -175,7 +175,7 @@ module Remap
|
|
175
175
|
#
|
176
176
|
# @return [void]
|
177
177
|
def self.rule(...)
|
178
|
-
self.rules = rules + [->
|
178
|
+
self.rules = rules + [-> { rule(...) }]
|
179
179
|
end
|
180
180
|
|
181
181
|
# Defines a required option for the mapper
|
data/lib/remap/contract.rb
CHANGED
@@ -13,11 +13,11 @@ module Remap
|
|
13
13
|
def self.call(rules:, options:, contract:, attributes:)
|
14
14
|
Class.new(self) do
|
15
15
|
rules.each do |rule|
|
16
|
-
|
16
|
+
instance_exec(&rule)
|
17
17
|
end
|
18
18
|
|
19
19
|
options.each do |option|
|
20
|
-
|
20
|
+
instance_exec(&option)
|
21
21
|
end
|
22
22
|
|
23
23
|
schema(contract)
|