We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acccdcb commit 4b1bdedCopy full SHA for 4b1bded
lib/json_schematize/field_transformations.rb
@@ -20,7 +20,13 @@ def transform_converter_type!
20
21
@converter = DEFAULT_CONVERTERS[@acceptable_types[0]]
22
if @converter.nil?
23
- @converter = ->(val) { @acceptable_types[0].new(val) }
+ @converter = Proc.new do |val|
24
+ if @acceptable_types[0] < JsonSchematize::Generator && @acceptable_types[0] === val
25
+ val
26
+ else
27
+ @acceptable_types[0].new(val)
28
+ end
29
30
end
31
32
lib/json_schematize/version.rb
@@ -1,5 +1,5 @@
1
# frozen_string_literal: true
2
3
module JsonSchematize
4
- VERSION = "0.11.0"
+ VERSION = "0.12.0"
5
0 commit comments