Class: Cocina::Models::DRO
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Cocina::Models::DRO
- Defined in:
- lib/cocina/models/dro.rb
Overview
A digital repository object. See github.com/sul-dlss-labs/taco/blob/master/maps/DRO.json
Class Method Summary collapse
Class Method Details
.from_dynamic(d) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/cocina/models/dro.rb', line 13 def self.from_dynamic(d) DRO.new( externalIdentifier: d['externalIdentifier'], type: d['type'], label: d['label'] ) end |
.from_json(json) ⇒ Object
21 22 23 |
# File 'lib/cocina/models/dro.rb', line 21 def self.from_json(json) from_dynamic(JSON.parse(json)) end |