Sha256: 2a28cb13e09847f177bbad5eba371bbbdd9d14ed4a70bc4df69b058e59e9520b
Contents?: true
Size: 493 Bytes
Versions: 25
Compression:
Stored size: 493 Bytes
Contents
require "active_resource" module Ddr::Models class License < ActiveResource::Base self.site = ENV["DDR_AUX_API_URL"] attr_accessor :pid def self.call(obj) if obj.license license = new get(:find, url: obj.license) license.pid = obj.pid license 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
25 entries across 25 versions & 1 rubygems