class Representable::Serializer::Collection
Public Instance Methods
serialize(array, *args)
click to toggle source
# File lib/representable/serializer.rb, line 38 def serialize(array, *args) collection = [] # TODO: unify with Deserializer::Collection. array.each do |item| next if @binding.evaluate_option(:skip_render, item) # TODO: allow skipping entire collections? same for deserialize. collection << serialize!(item, *args) end # TODO: i don't want Array but Forms here - what now? collection end