lib/zanders/base.rb in zanders-2.0 vs lib/zanders/base.rb in zanders-2.0.1

- old
+ new

@@ -38,7 +38,21 @@ self.class.connect(options) do |ftp| yield ftp end end + def content_for(xml_doc, field) + node = xml_doc.css(field).first + + if node.nil? + nil + else + if node.css("DATA").present? + node.css("DATA").text.strip + else + node.content.strip + end + end + end + end end