Class: XPath::Object
- Inherits:
- BasicObject
- Defined in:
- lib/libxml/monkeypatches.rb
Instance Method Summary collapse
Instance Method Details
#inspect ⇒ Object
93 94 95 96 97 98 99 100 101 |
# File 'lib/libxml/monkeypatches.rb', line 93 def inspect return "#<%p:%#016x %s:%s [%d nodes]>" % [ self.class, self.object_id * 2, self.string || "''", self.xpath_type_name, self.length, ] end |
#xpath_type_name ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/libxml/monkeypatches.rb', line 103 def xpath_type_name return case self.xpath_type when LibXML::XML::XPath::UNDEFINED "undefined" when LibXML::XML::XPath::NODESET "nodeset" when LibXML::XML::XPath::BOOLEAN "boolean" when LibXML::XML::XPath::NUMBER "number" when LibXML::XML::XPath::STRING "string" when LibXML::XML::XPath::POINT "point" when LibXML::XML::XPath::RANGE "range" when LibXML::XML::XPath::LOCATIONSET "locationset" when LibXML::XML::XPath::USERS "users" when LibXML::XML::XPath::XSLT_TREE "xslt_tree" else nil end end |