File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- json_schematize (0.13.0 )
4+ json_schematize (0.13.1 )
55 class_composer (>= 1.0 )
66
77GEM
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ module InstanceMethods
55 def to_h
66 self . class . fields . map do |field |
77 value = method ( :"#{ field . name } " ) . ( )
8- if field . array_of_types
8+ if value . class == JsonSchematize ::EmptyValue
9+ [ field . name , nil ]
10+ elsif field . array_of_types
911 [ field . name , value . map ( &:to_h ) ]
1012 elsif value . class == Class
1113 [ field . name , value . to_s ]
12- elsif value . class == JsonSchematize ::EmptyValue
13- [ field . name , nil ]
1414 elsif JsonSchematize ::Generator > value . class
1515 [ field . name , value . to_h ]
1616 else
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module JsonSchematize
4- VERSION = "0.13.0 "
4+ VERSION = "0.13.1 "
55end
You can’t perform that action at this time.
0 commit comments