Sha256: 645d4ad4995f85368304c1910526881a08b5228b8b141e2a5ba325462010b155

Contents?: true

Size: 348 Bytes

Versions: 33

Compression:

Stored size: 348 Bytes

Contents

module Ddr
  class RightsStatement < AuxiliaryResource

    def self.call(obj)
      if obj.rights.present?
        new get(:find, url: obj.rights.first)
      end
    rescue ActiveResource::ResourceNotFound => e
      raise Ddr::NotFoundError, e
    end

    def self.keys
      all.map(&:url)
    end

    def to_s
      title
    end

  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
ddr-core-1.4.4 app/models/ddr/rights_statement.rb
ddr-core-1.4.3 app/models/ddr/rights_statement.rb
ddr-core-1.4.2 app/models/ddr/rights_statement.rb
ddr-core-1.4.0 app/models/ddr/rights_statement.rb
ddr-core-1.3.0 app/models/ddr/rights_statement.rb
ddr-core-1.2.0 app/models/ddr/rights_statement.rb
ddr-core-1.2.0.rc3 app/models/ddr/rights_statement.rb
ddr-core-1.2.0.rc2 app/models/ddr/rights_statement.rb
ddr-core-1.2.0.rc1 app/models/ddr/rights_statement.rb
ddr-core-1.1.2 app/models/ddr/rights_statement.rb
ddr-core-1.1.1 app/models/ddr/rights_statement.rb
ddr-core-1.1.0 app/models/ddr/rights_statement.rb
ddr-core-1.0.0 app/models/ddr/rights_statement.rb