Class: SearchSuggestionParser

Inherits:
HTTParty::Parser
  • Object
show all
Defined in:
lib/itis.rb

Instance Method Summary collapse

Instance Method Details

#nokoObject



43
44
45
46
47
48
49
# File 'lib/itis.rb', line 43

def noko
  doc = Nokogiri::XML(body)
  doc.remove_namespaces!
  results = doc.xpath("//Item").to_a
  return results.map!{|element| ItisItem.new(element)} unless results.empty?
  []
end