Sha256: ca1d7c5d874736e60d4cd5c38e1944f565b5a3d80de3232875f2db5a101eaf7f

Contents?: true

Size: 362 Bytes

Versions: 43

Compression:

Stored size: 362 Bytes

Contents

module Ddr
  class Target < Resource

    include HasContent

    attribute :for_collection_id, Valkyrie::Types::ID.optional

    def for_collection
      Ddr.query_service.find_by(id: for_collection_id) if for_collection_id
    end

    def components
      Ddr.query_service.find_inverse_references_by(resource: self, property: 'target_id')
    end

  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ddr-core-1.6.1 app/models/ddr/target.rb
ddr-core-1.6.0 app/models/ddr/target.rb
ddr-core-1.5.5 app/models/ddr/target.rb
ddr-core-1.5.4 app/models/ddr/target.rb
ddr-core-1.5.2 app/models/ddr/target.rb
ddr-core-1.5.3 app/models/ddr/target.rb
ddr-core-1.5.1 app/models/ddr/target.rb
ddr-core-1.4.4 app/models/ddr/target.rb
ddr-core-1.4.3 app/models/ddr/target.rb
ddr-core-1.4.2 app/models/ddr/target.rb
ddr-core-1.4.0 app/models/ddr/target.rb
ddr-core-1.3.0 app/models/ddr/target.rb
ddr-core-1.2.0 app/models/ddr/target.rb
ddr-core-1.2.0.rc3 app/models/ddr/target.rb
ddr-core-1.2.0.rc2 app/models/ddr/target.rb
ddr-core-1.2.0.rc1 app/models/ddr/target.rb
ddr-core-1.1.2 app/models/ddr/target.rb
ddr-core-1.1.1 app/models/ddr/target.rb
ddr-core-1.1.0 app/models/ddr/target.rb
ddr-core-1.0.0 app/models/ddr/target.rb