Sha256: 677071d2ec06726bb2f79064e78532bacb18ec603825cbdbf55d282661d5d266
Contents?: true
Size: 635 Bytes
Versions: 10
Compression:
Stored size: 635 Bytes
Contents
module Hyrax # Presents embargoed objects class EmbargoPresenter include ModelProxy attr_accessor :solr_document delegate :human_readable_type, :visibility, :to_s, to: :solr_document # @param [SolrDocument] solr_document def initialize(solr_document) @solr_document = solr_document end def embargo_release_date Date.parse(solr_document.embargo_release_date).to_formatted_s(:rfc822) end def visibility_after_embargo solr_document.fetch('visibility_after_embargo_ssim', []).first end def embargo_history solr_document['embargo_history_ssim'] end end end
Version data entries
10 entries across 10 versions & 2 rubygems