lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.0.0 vs lib/ledger_sync/domains/serializer/struct.rb in ledger_sync-domains-1.0.1
- old
+ new
@@ -51,10 +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('::'))
- module_name.remove_const(struct_name) if module_name.const_defined?(struct_name)
+ # module_name.remove_const(struct_name) if module_name.const_defined?(struct_name)
module_name.const_set(struct_name, Class.new(OpenStruct))
klass.with_lazy_references(
hash,
struct_class: module_name.const_get(struct_name),