Module: Ddr::HasStructMetadata

Extended by:
ActiveSupport::Concern
Included in:
Collection, Item
Defined in:
app/models/concerns/ddr/has_struct_metadata.rb

Instance Method Summary collapse

Instance Method Details

#structureObject



9
10
11
12
13
14
# File 'app/models/concerns/ddr/has_struct_metadata.rb', line 9

def structure
  if has_struct_metadata?
    file = Ddr.storage_adapter.find_by(id: .file_identifier)
    Ddr::Structure.new(Nokogiri::XML(file))
  end
end