Class: Nokogiri::XML::Node
- Inherits:
-
Object
- Object
- Nokogiri::XML::Node
- Defined in:
- lib/rdf/rdfxml/patches/nokogiri_hacks.rb
Instance Method Summary collapse
-
#attribute_with_ns(name, namespace) ⇒ Nokogiri::XML::Attr
Monkey patch attribute_with_ns, to insure nil is returned for #null?.
- #attribute_with_ns_without_ffi_null ⇒ Object
-
#uri ⇒ Object
URI of namespace + node_name.
Instance Method Details
#attribute_with_ns(name, namespace) ⇒ Nokogiri::XML::Attr
Monkey patch attribute_with_ns, to insure nil is returned for #null?
Get the attribute node with name and namespace
18 19 20 21 22 |
# File 'lib/rdf/rdfxml/patches/nokogiri_hacks.rb', line 18 def attribute_with_ns(name, namespace) a = attribute_with_ns_without_ffi_null(name, namespace) (a.respond_to?(:null?) && a.null?) ? nil : a # to ensure FFI Pointer compatibility end |
#attribute_with_ns_without_ffi_null ⇒ Object
9 |
# File 'lib/rdf/rdfxml/patches/nokogiri_hacks.rb', line 9 alias_method :attribute_with_ns_without_ffi_null, :attribute_with_ns |