42 43 44 45 46 47 48
# File 'lib/amzwish/wishlist.rb', line 42 def books @page.xpath('//tbody[@class="itemWrapper"]').collect do |e| title = e.xpath('.//a[1]/text()').to_s asin = e.xpath("@name").to_s.split('.').last Book.new( title, asin) end end