Sha256: ad5deb558899b1fd3dc8421b45d9fe8f1ad577970534d7e6ca57656c27e15cc8

Contents?: true

Size: 306 Bytes

Versions: 11

Compression:

Stored size: 306 Bytes

Contents

require "ddr_aux/client"

module Ddr::Models
  class License < DdrAux::Client::License

    attr_accessor :pid

    def self.call(obj)
      if obj.license
        license = find(url: obj.license)
        license.pid = obj.pid
        license
      end
    end

    def to_s
      title
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ddr-models-2.3.2 lib/ddr/models/licenses/license.rb
ddr-models-2.3.1 lib/ddr/models/licenses/license.rb
ddr-models-2.3.0 lib/ddr/models/licenses/license.rb
ddr-models-3.0.0.alpha.2 lib/ddr/models/licenses/license.rb
ddr-models-3.0.0.alpha.1 lib/ddr/models/licenses/license.rb
ddr-models-2.2.0 lib/ddr/models/licenses/license.rb
ddr-models-2.1.3 lib/ddr/models/licenses/license.rb
ddr-models-2.1.2 lib/ddr/models/licenses/license.rb
ddr-models-2.1.1 lib/ddr/models/licenses/license.rb
ddr-models-2.1.0 lib/ddr/models/license.rb
ddr-models-2.1.0.rc2 lib/ddr/models/license.rb