Sha256: 8471cfb935cd9d8b01c11ca52075641dc9d6bac9fd5d0b62543b97ec41be480a
Contents?: true
Size: 671 Bytes
Versions: 20
Compression:
Stored size: 671 Bytes
Contents
module Ddr::Models::Structures # # Wraps a Nokogiri (XML) 'fptr' node # class Fptr < SimpleDelegator def id self['ID'] end def fileid self['FILEID'] end def dereferenced_hash structure = Ddr::Models::Structure.new(document) file = File.find(structure, fileid) repo_id = file.repo_ids.first use = file.flocats.first.effective_use { id: id, repo_id: repo_id, use: use }.compact end def self.build(args) node = Nokogiri::XML::Node.new('fptr', args[:document]) node['ID'] = args[:id] if args[:id] node['FILEID'] = args[:fileid] if args[:fileid] node end end end
Version data entries
20 entries across 20 versions & 1 rubygems