schema-normalize 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/normalize.rb +2 -2
- data/schema-normalize.gemspec +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: 1b2c4b83a0c2bd3c39f93c469822c7d03815dc740f67f729743cef056ceba075
|
4
|
+
data.tar.gz: '091254f87588edfacf32ebac74d356d5911f27674d7f12bd61d9ccccf439be89'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e023b33f521b186d1ce6f168f0c3bdb157fbb57e33803d8e420d281e4694d4ba88cf0d1392f3b9478e5c8322d30e6ece3993415f5d1e0b9f00e1b4d9904da3c6
|
7
|
+
data.tar.gz: 0f3d0a0fe8b443971ee132a7c08d6d25ba4ed1d8b4869b13a8456dadf3e564e6414711cbf8a48afe263cf864d3a94e36b900586704309f9bef2897382a66d804
|
data/lib/schema/normalize.rb
CHANGED
@@ -24,8 +24,8 @@ module Schema
|
|
24
24
|
@schema_model_normalizer ||= create_schema_model_normalizer
|
25
25
|
end
|
26
26
|
|
27
|
-
def normalize(attribute_name, method_name, options = {})
|
28
|
-
new_value = schema_normalizations.dup << [attribute_name, method_name, options]
|
27
|
+
def normalize(attribute_name, method_name = nil, options = {}, &block)
|
28
|
+
new_value = schema_normalizations.dup << [attribute_name, method_name || block, options]
|
29
29
|
redefine_class_method(:schema_normalizations, new_value)
|
30
30
|
end
|
31
31
|
end
|
data/schema-normalize.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-normalize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inheritance-helper
|