Sha256: f2c169cec552330fca6f19ea062d5cd8571464c266f416ff6699201ee27c834b
Contents?: true
Size: 655 Bytes
Versions: 33
Compression:
Stored size: 655 Bytes
Contents
module Ddr::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::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
33 entries across 33 versions & 1 rubygems