Module: FN::Util

Included in:
Document, Document::ClassMethods, Resource
Defined in:
lib/fn/util.rb

Instance Method Summary collapse

Instance Method Details

#raise_unless_xml_doc(xml) ⇒ Object



16
17
18
19
20
21
# File 'lib/fn/util.rb', line 16

def raise_unless_xml_doc(xml)
  
  if !xml.is_a?(XML::Document)
    raise XMLTypeError.new("Not a LibXML doc")
  end
end

#raise_unless_xml_node(xml) ⇒ Object



23
24
25
26
27
# File 'lib/fn/util.rb', line 23

def raise_unless_xml_node(xml)
  if !xml.is_a?(XML::Node)
    raise XMLTypeError.new("Not a LibXML node")
  end
end