lib/representable/populator.rb in representable-2.1.8 vs lib/representable/populator.rb in representable-2.2.0

- old
+ new

@@ -33,16 +33,12 @@ # use a Deserializer to transform fragment to/into object. deserializer.call(fragment) # CollectionDeserializer/HashDeserializer/etc. end - def deserializer_class - Deserializer - end - def deserializer - deserializer_class.new(@binding) + @binding.deserializer end # A separated collection deserializer/populator allows us better dealing with populating/modifying # collections of models. (e.g. replace, update, push, etc.). @@ -50,19 +46,11 @@ class Collection < self private def deserialize(fragment) return deserializer.call(fragment) end - - def deserializer - Deserializer::Collection.new(@binding) - end end class Hash < self - private - def deserializer_class - Deserializer::Hash - end end end end \ No newline at end of file