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

Version Path
rubyjedi-nokogiri_java-1.4.0.20100513161003-java lib/nokogiri/ffi/structs/common_node.rb
jwagener-nokogiri-1.4.1 lib/nokogiri/ffi/structs/common_node.rb
revo-nokogiri-1.4.1-java lib/nokogiri/ffi/structs/common_node.rb
revo-nokogiri-1.4.0.3-java lib/nokogiri/ffi/structs/common_node.rb
revo-nokogiri-1.4.0-java lib/nokogiri/ffi/structs/common_node.rb
revo-nokogiri-1.4.0.20100202165440-java lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.1-x86-mswin32 lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.1-x86-mingw32 lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.1-java lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.1 lib/nokogiri/ffi/structs/common_node.rb
superfeedr-nokogiri-1.4.0.20091116183308 lib/nokogiri/ffi/structs/common_node.rb
caring-nokogiri-1.4.1.pre1 lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.0-java lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.0-x86-mswin32 lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.0-x86-mingw32 lib/nokogiri/ffi/structs/common_node.rb
nokogiri-1.4.0 lib/nokogiri/ffi/structs/common_node.rb