Module: OM::XML::Container::ClassMethods
- Defined in:
- lib/om/xml/container.rb
Overview
Class Methods – These methods will be available on classes that include this Module
Instance Method Summary collapse
Instance Method Details
#from_xml(xml, tmpl = self.new) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/om/xml/container.rb', line 11 def from_xml(xml, tmpl=self.new) # :nodoc: if xml.kind_of? Nokogiri::XML::Node tmpl.ng_xml = xml else tmpl.ng_xml = Nokogiri::XML::Document.parse(xml) end return tmpl end |