Method: Frodo::Entity.from_xml

Defined in:
lib/frodo/entity.rb

.from_xml(xml_doc, options = {}) ⇒ Frodo::Entity

Create Entity from XML document with provided options.

Parameters:

  • xml_doc (Nokogiri::XML)
  • options (Hash) (defaults to: {})

Returns:



167
168
169
170
171
172
173
# File 'lib/frodo/entity.rb', line 167

def self.from_xml(xml_doc, options = {})
  return nil if xml_doc.nil?
  entity = Frodo::Entity.new(options)
  process_properties(entity, xml_doc)
  process_links(entity, xml_doc)
  entity
end