remap 2.1.15 → 2.1.19

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: e3439c23b054b2470688ec55cedb4dc0d7c0f77544c45f8f47c82b5d8d9b954a
4
- data.tar.gz: 515558fee642db02bd30e5194846a4486f6b59c67830c46581b9b3d3c529532e
3
+ metadata.gz: 2de001b8493f46a8be6fc561d2f2f07bdaa0633af3bc6687e33fada1ddc0f782
4
+ data.tar.gz: f902cc70a8e549fd55de1d28a9a924361d8c465d81c9cd10d79beefcb0e6f65e
5
5
  SHA512:
6
- metadata.gz: 599b8f2de0d62e5d4ab8ded2d303243fe11292f0cc621b7cdf66bb9e70ac712bb3fe4811cd926e9929a06f110445e283b2b8c3134a68cec5c810c53f572f720c
7
- data.tar.gz: 6cf4704750445ac8dfdac08cfe2beec2bff5ac34db4c61557f9239b49857c3a1423978d6cc38342917753d48b4edeeff397d012c8b91d32a3ee49ec96ab62fa4
6
+ metadata.gz: 6898f7a1e8d5fab64851fe16a616dbbffccefcb034fc4799909bea7b4ea71d050c97b02b39b889cfe0ea885a56a67030732339c670859c43a51542533779d6ca
7
+ data.tar.gz: 52cb4e7957dc24f3b609c87923957d025e237c43961b40954167b1f6a92e0a5cf3e3335af59e7d635088c1f2f3553f1ca526c8fcd26b6504935371ada00e256d
@@ -34,7 +34,7 @@ module Remap
34
34
  key = path.first
35
35
 
36
36
  unless block_given?
37
- get(*path, trace: trace) do
37
+ return get(*path, trace: trace) do
38
38
  raise PathError, trace + [key]
39
39
  end
40
40
  end
@@ -34,7 +34,7 @@ module Remap
34
34
  return self if path.empty?
35
35
 
36
36
  unless block_given?
37
- get(*path, trace: trace) do
37
+ return get(*path, trace: trace) do
38
38
  raise PathError, trace
39
39
  end
40
40
  end
data/lib/remap/state.rb CHANGED
@@ -30,19 +30,15 @@ module Remap
30
30
  #
31
31
  # @return [Hash] A valid state
32
32
  def self.call(value, mapper: Dummy, options: EMPTY_HASH)
33
- value._ do
34
- return {
35
- notices: EMPTY_ARRAY,
36
- path: EMPTY_ARRAY,
37
- options: options,
38
- mapper: mapper,
39
- values: value,
40
- value: value,
41
- input: value
42
- }._
43
- end
44
-
45
- raise ArgumentError, "Input is a state: #{value}"
33
+ {
34
+ notices: EMPTY_ARRAY,
35
+ path: EMPTY_ARRAY,
36
+ options: options,
37
+ mapper: mapper,
38
+ values: value,
39
+ value: value,
40
+ input: value
41
+ }._
46
42
  end
47
43
  end
48
44
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.15
4
+ version: 2.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2021-12-08 00:00:00.000000000 Z
@@ -305,7 +305,7 @@ metadata:
305
305
  homepage_uri: https://github.com/oleander/remap
306
306
  documentation_uri: http://oleander.io/remap/
307
307
  rubygems_mfa_required: 'true'
308
- post_install_message:
308
+ post_install_message:
309
309
  rdoc_options: []
310
310
  require_paths:
311
311
  - lib
@@ -321,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
321
321
  version: '0'
322
322
  requirements: []
323
323
  rubygems_version: 3.2.32
324
- signing_key:
324
+ signing_key:
325
325
  specification_version: 4
326
326
  summary: An expressive and feature-complete data mapper with intuitive syntax thanks
327
327
  to its DSL