lib/cinnamon_serial/base.rb in cinnamon_serial-1.0.0 vs lib/cinnamon_serial/base.rb in cinnamon_serial-1.0.1

- old
+ new

@@ -67,9 +67,13 @@ end def materialize_data @data = {} + # Soft dependency on ActiveSupport. + # If it is understood how to create indifferently accessible hashes, then let's prefer that. + @data = @data.with_indifferent_access if @data.respond_to?(:with_indifferent_access) + inherited_cinnamon_serial_specification.attribute_map.each do |key, options| @data[key.to_s] = options.resolve(self, key) end nil