lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.0.0.rc9 vs lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.0.0.rc10

- old
+ new

@@ -51,12 +51,10 @@ name = serializer_name.split('::') class_name = name.pop.gsub(/[^0-9a-z ]/i, '').gsub(/.*\KSerializer/, '') struct_name = "#{class_name}Struct" module_name = name.empty? ? Object : Object.const_get(name.join('::')) - unless module_name.const_defined?(struct_name) - module_name.const_set(struct_name, Class.new(OpenStruct)) - end + module_name.const_set(struct_name, Class.new(OpenStruct)) klass.with_lazy_references( hash, struct_class: module_name.const_get(struct_name), resource: resource, references: references