class AmazonOrder::Parsers::Product
Constants
- ATTRIBUTES
Public Instance Methods
content()
click to toggle source
# File lib/amazon_order/parsers/product.rb, line 19 def content @_content ||= @node.css('.a-col-right .a-row')[1..-1].map(&:text).join.gsub(/\s+/, ' ').strip end
image_url()
click to toggle source
# File lib/amazon_order/parsers/product.rb, line 23 def image_url @_image_url ||= begin img = @node.css('.a-col-left img')[0] get_original_image_url(img.attr('data-a-hires').presence || img.attr('src')) end end
path()
click to toggle source
# File lib/amazon_order/parsers/product.rb, line 15 def path @_path ||= @node.css('.a-col-right .a-row a')[0].attr('href') rescue nil end
title()
click to toggle source
# File lib/amazon_order/parsers/product.rb, line 11 def title @_title ||= @node.css('.a-col-right .a-row')[0].text.strip end