Sha256: 180eee9abb0787d353060cd2462814b8025186ff952b617bd2441cb6f9448596

Contents?: true

Size: 381 Bytes

Versions: 2

Compression:

Stored size: 381 Bytes

Contents

# frozen_string_literal: true

module DigitalScriptorium
  # An item representing a Digital Scriptorium manuscript (instance of Q1)
  class Manuscript < DsItem
    include PropertyId

    def ds_id
      claims_by_property_id(DS_ID)&.first&.data_value # P1
    end

    def holding_ids
      claims_by_property_id(MANUSCRIPT_HOLDING)&.map(&:entity_id_value) # P2
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
digital_scriptorium-0.2.1 lib/digital_scriptorium/manuscript.rb
digital_scriptorium-0.2.0 lib/digital_scriptorium/manuscript.rb