Sha256: 7181478fbc6053e052462b71d6c9550d35a8c1c686f545bdba9f3e1f7cbea12e
Contents?: true
Size: 621 Bytes
Versions: 16
Compression:
Stored size: 621 Bytes
Contents
module Nokogiri module LibXML # :nodoc: module CommonNode # :nodoc: def document p = self[:doc] p.null? ? nil : LibXML::XmlDocumentCast.new(p) end def ruby_node self[:_private] != 0 ? ObjectSpace._id2ref(self[:_private]) : nil end def ruby_node= object self[:_private] = object.object_id end def keep_reference_from_document! # equivalent to NOKOGIRI_ROOT_NODE doc = self.document raise "no document to add reference to" unless doc LibXML.xmlXPathNodeSetAdd(doc.unlinked_nodes, self) end end end end
Version data entries
16 entries across 16 versions & 6 rubygems