Module: Nokogiri::LibXML::XmlXpathContextMixin

Included in:
XmlXpathContext, XmlXpathContextCast
Defined in:
lib/nokogiri/ffi/structs/xml_xpath_context.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/nokogiri/ffi/structs/xml_xpath_context.rb', line 4

def self.included(base)
  base.class_eval do

    layout(
      :doc,  :pointer,
      :node, :pointer
      )

  end
end

Instance Method Details

#docObject



19
20
21
# File 'lib/nokogiri/ffi/structs/xml_xpath_context.rb', line 19

def doc
  LibXML::XmlDocumentCast.new(self[:doc])
end

#nodeObject



15
16
17
# File 'lib/nokogiri/ffi/structs/xml_xpath_context.rb', line 15

def node
  LibXML::XmlNode.new(self[:node])
end