Sha256: f03f06e470d0a8789577d1f7925ecb10a0460605083d032d43119621b0b43e93

Contents?: true

Size: 342 Bytes

Versions: 5

Compression:

Stored size: 342 Bytes

Contents

# frozen_string_literal: true
module SocialNetworking
  module Serializers
    # Abstract serializer.
    class Serializer
      attr_reader :model

      def self.from_collection(collection)
        collection.map { |i| new(i).to_serialized }.compact
      end

      def initialize(model)
        @model = model
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
social_networking-0.13.3 app/models/social_networking/serializers/serializer.rb
social_networking-0.13.2 app/models/social_networking/serializers/serializer.rb
social_networking-0.13.1 app/models/social_networking/serializers/serializer.rb
social_networking-0.13.0 app/models/social_networking/serializers/serializer.rb
social_networking-0.12.0 app/models/social_networking/serializers/serializer.rb