Sha256: 21e09cf6089f16392266680b97f513d2e9916a5184d3371d42ba1b77a3f6453c
Contents?: true
Size: 434 Bytes
Versions: 12
Compression:
Stored size: 434 Bytes
Contents
require "active_resource" module Ddr::Models class RightsStatement < ActiveResource::Base self.site = ENV["DDR_AUX_API_URL"] def self.call(obj) if obj.rights.present? new get(:find, url: obj.rights.first) end rescue ActiveResource::ResourceNotFound => e raise Ddr::Models::NotFoundError, e end def self.keys all.map(&:url) end def to_s title end end end
Version data entries
12 entries across 12 versions & 1 rubygems