Class: XMP::Handler::XML

Inherits:
Object
  • Object
show all
Defined in:
lib/xmp/handler/xml.rb

Instance Method Summary collapse

Instance Method Details

#call(object) ⇒ Object



5
6
7
8
# File 'lib/xmp/handler/xml.rb', line 5

def call(object)
  object = Nokogiri::XML(object) if object.is_a? String
  XMP::Document.new(object) if object.is_a? Nokogiri::XML::Document and object.root
end