lib/vacuum/response.rb in vacuum-0.1.0 vs lib/vacuum/response.rb in vacuum-0.1.1

- old
+ new

@@ -33,11 +33,11 @@ # items = res.find('Item') # asins = res.find('Item') { |item| item['ASIN'] } # def find(query) xml.xpath("//xmlns:#{query}").map do |node| - hsh = HashBuilder.from_xml node + hsh = Knack.from_xml node block_given? ? yield(hsh) : hsh end end # @return [true, false] Whether the response has errors @@ -45,10 +45,10 @@ errors.count > 0 end # @return [Hash] A hash representation of the entire response. def to_hash - HashBuilder.from_xml xml + Knack.from_xml xml end # @return [true, false] Whether the HTTP response is OK def valid? code == 200