Method: Meteoroid::Sample.from_xml
- Defined in:
- lib/meteoroid/sample.rb
.from_xml(attribute_nodes, url = nil) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/meteoroid/sample.rb', line 38 def self.from_xml attribute_nodes, url = nil attributes = {} attribute_nodes.each do |node| attributes[node.name] = node.value end attributes.merge!({'u' => url}) if url new(attributes) end |