Sha256: 6f1b2b0fe0669db5c7db10cb356f36d3a2037f845191cab05bcbee508a3a8c4c

Contents?: true

Size: 696 Bytes

Versions: 21

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

module LinkedRails
  class Collection
    class ViewSerializer < LinkedRails.serializer_parent_class
      include LinkedRails::Serializer

      attribute :count, predicate: Vocab.as.totalItems
      attribute :display, predicate: Vocab.ontola[:collectionDisplay] do |object|
        Vocab.ontola["collectionDisplay/#{object.display || :default}"]
      end

      %i[next prev].each do |attr|
        attribute attr, predicate: Vocab.as[attr]
      end

      has_one :collection, predicate: Vocab.as.partOf
      has_one :unfiltered_collection, predicate: Vocab.ontola[:baseCollection]
      has_one :member_sequence, predicate: Vocab.as.items
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
linked_rails-0.0.4.pre.gfe77aae19 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.gc866c1806 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g3e8f5731a app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g58e27be7f app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g96885856b app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g1faca9643 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g4c8e21c9f app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g76dedd8ba app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g7123943aa app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g72bb595fe app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.gd8464437f app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g661cde413 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.ge09501794 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.gc3dfc6914 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g92825d924 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g14b377f91 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g2c53724b3 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g83aa52ab3 app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.gaa82a222d app/serializers/linked_rails/collection/view_serializer.rb
linked_rails-0.0.4.pre.g9b7bc9073 app/serializers/linked_rails/collection/view_serializer.rb