Sha256: 0dfcf1117630ee596f5a3501476b6e2ea066dc3f38154ce0034066aa05d288cb
Contents?: true
Size: 753 Bytes
Versions: 4
Compression:
Stored size: 753 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, polymorphic: true has_one :unfiltered_collection, predicate: Vocab.ontola[:baseCollection], polymorphic: true has_one :member_sequence, predicate: Vocab.as.items, polymorphic: true end end end
Version data entries
4 entries across 4 versions & 1 rubygems