Sha256: 3085938b8607a90c6501833c7153d6668ac9e37c347252f39c91373b79876487
Contents?: true
Size: 695 Bytes
Versions: 5
Compression:
Stored size: 695 Bytes
Contents
class DarwinCore class Core def initialize(archive) @archive = archive @path = @archive.files_path root_key = @archive.meta.keys[0] @core = @archive.meta[root_key][:core] raise "Cannot found core in meta.xml, is meta.xml valid?" unless @core end def data @core end def properties @core[:attributes] end def file_path file = @core[:files][:location] || @core[:location] File.join(@path, file) end def id @core[:id][:attributes] end def fields @core[:field] = [@core[:field]] unless @core[:field].class == Array @core[:field].map {|f| f[:attributes]} end end end
Version data entries
5 entries across 5 versions & 1 rubygems