parameter_normalizer 0.2.0 → 0.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58d4d06affca59a94ff2f62dc948c1b130869407246fdbb6561534ac349e8e7f
|
4
|
+
data.tar.gz: 892359b6a2b76b655217f6e1a7b491fab1993d7a9a1b84b50bc6b66eeda635fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a54177aa28fd77f9cec3a5aa4ca1f3edeb06afb31ae2a605dadc273c69e51f44849f0be0890aed3fa083e41bbc343266100699537f37067713d5b64d15f6970
|
7
|
+
data.tar.gz: afbc832b80a5612d503dcdb04b615832fe9ed984cd33fcadb8248ea02df3cb0556ab4cd796ad285cfbb2c2dc10e350ffd3db3e7d3185aa91b6d170fc5fbde530
|
@@ -6,6 +6,14 @@ module ParameterNormalizer
|
|
6
6
|
def parameter_normalizer
|
7
7
|
@parameter_normalizer ||= ParameterNormalizer::Normalizer.new
|
8
8
|
end
|
9
|
+
|
10
|
+
def normalize_parameter(key, method, skip_key_not_found: true)
|
11
|
+
if skip_key_not_found
|
12
|
+
return unless params.key?(key)
|
13
|
+
end
|
14
|
+
|
15
|
+
params[key] = parameter_normalizer.public_send(method, params[key])
|
16
|
+
end
|
9
17
|
end
|
10
18
|
end
|
11
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parameter_normalizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Ooishi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|