lib/ddr/models/licenses/license.rb in ddr-models-3.0.0.alpha.2 vs lib/ddr/models/licenses/license.rb in ddr-models-3.0.0.alpha.3

- old
+ new

@@ -1,17 +1,23 @@ require "ddr_aux/client" module Ddr::Models class License < DdrAux::Client::License + extend Deprecation - attr_accessor :pid + attr_accessor :object_id def self.call(obj) if obj.license license = find(url: obj.license) - license.pid = obj.pid + license.object_id = obj.id license end + end + + def pid + Deprecation.warn(License, "Use `object_id` instead.") + object_id end def to_s title end