lib/lazy_mapper.rb in lazy_mapper-0.3.0 vs lib/lazy_mapper.rb in lazy_mapper-0.3.1

- old
+ new

@@ -70,11 +70,11 @@ def self.attributes @attributes ||= {} end - def self.inherited(klass) + def self.inherited klass # :nodoc: # Make the subclass "inherit" the values of these class instance variables %i[ mappers default_values attributes @@ -158,11 +158,11 @@ instance.send :unmapped_data=, unmapped_data.to_h instance.send :mappers=, mappers instance end - def self.from_json *args, &block + def self.from_json *args, &block # :nodoc: warn "#{ self }.from_json is deprecated. Use #{ self }.from instead." from *args, &block end # @@ -290,9 +290,11 @@ else mapped_value name, unmapped_value, Array, **args end } } + + attributes[name] = Array end # # Adds an instance-level type mapper #