Method: CatEngine::FlatEngine#process
- Defined in:
- lib/cat_engine/flat_engine.rb
#process(id, history) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cat_engine/flat_engine.rb', line 11 def process id, history self.id = id doc = Nokogiri.parse(form) item = doc.root.css("Item").reject do |item| full_history.include?(item["FormItemOID"]) end.first doc.root.children.each(&:unlink) if item item.parent = doc.root else doc.root = doc.create_element("Results") end doc end |