aboutsummaryrefslogtreecommitdiff
path: root/src/serializers/base_serializer.cr
blob: 3ad0a6698108e8e25d3d3df156a87a9ff6ea5920 (plain)
1
2
3
4
5
6
7
abstract class BaseSerializer < Lucky::Serializer
  def self.for_collection(collection : Enumerable, *args, **named_args)
    collection.map do |object|
      new(object, *args, **named_args)
    end
  end
end