Sha256: defe4dbd942549959be7ab772894fb9a4aca3f82912746a2cb70700e919de445
Contents?: true
Size: 511 Bytes
Versions: 1
Compression:
Stored size: 511 Bytes
Contents
class XMP::Document include XMP::Convenience attr_reader :namespaces attr_reader :xml def initialize(doc = nil) if doc @xml = doc.root @namespaces = doc.collect_namespaces.map do |ns, url| @xml.add_namespace_definition ns, url ns[/^(?:xmlns:)?xmlns:(.+)/, 1] end else @xml = nil @namespaces = [] end end def empty? @xml.nil? end private def list namespaces end def get(key) XMP::Namespace.new(self, key) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xmp-2.0.0 | lib/xmp/document.rb |