Method: Libis::Services::Rosetta::User.from_xml

Defined in:
lib/libis/services/rosetta/user.rb

.from_xml(xml) ⇒ Object



57
58
59
60
61
62
63
64
65
66
# File 'lib/libis/services/rosetta/user.rb', line 57

def self.from_xml(xml)
  xml_doc = Libis::Tools::XmlDocument.parse(xml)
  hash = xml_doc.to_hash(
      strip_namespaces: true,
      delete_namespace_attributes: true,
      empty_tag_value: nil,
      convert_tags_to: lambda { |tag| tag.to_sym }
  )
  self.new(hash[:producer_info])
end