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