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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88a1219e8e98d03219ffdf7cc80fca3a04432001d93be6aa40da025d26812fc7
4
- data.tar.gz: 65f144251b614287fb12f2bee4f995fef0d8c1e9aaea10cc3f75da8b99e5ba0f
3
+ metadata.gz: 1b2c4b83a0c2bd3c39f93c469822c7d03815dc740f67f729743cef056ceba075
4
+ data.tar.gz: '091254f87588edfacf32ebac74d356d5911f27674d7f12bd61d9ccccf439be89'
5
5
  SHA512:
6
- metadata.gz: edd3f094a8e0d8efa4698c3ec4a173256a14b8740aaf0409420554e98799f11942a2432511ca0824b2db09e4ef8ede7ffc68fe794d5a8245319a9a2bacc9b879
7
- data.tar.gz: 41994b10302759b7e1d61c315f16a3dfaa33f5c3a812f6fd0bdb5094618a66fea25f838181db47dff17612c8653c8bb54563b217b19e49eb7dafd38cd482a6b5
6
+ metadata.gz: e023b33f521b186d1ce6f168f0c3bdb157fbb57e33803d8e420d281e4694d4ba88cf0d1392f3b9478e5c8322d30e6ece3993415f5d1e0b9f00e1b4d9904da3c6
7
+ data.tar.gz: 0f3d0a0fe8b443971ee132a7c08d6d25ba4ed1d8b4869b13a8456dadf3e564e6414711cbf8a48afe263cf864d3a94e36b900586704309f9bef2897382a66d804
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'schema-normalize'
5
- s.version = '0.1.0'
5
+ s.version = '0.1.2'
6
6
  s.licenses = ['MIT']
7
7
  s.summary = 'Schema Normalize'
8
8
  s.description = 'Easy way to normalize attributes'
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.0
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: 2021-03-19 00:00:00.000000000 Z
11
+ date: 2022-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inheritance-helper