Skip to content

Instantly share code, notes, and snippets.

@salma71
Last active March 16, 2018 20:52
Show Gist options
  • Save salma71/bdaefe6d1b6d8a79eb1334263da8eed8 to your computer and use it in GitHub Desktop.
Save salma71/bdaefe6d1b6d8a79eb1334263da8eed8 to your computer and use it in GitHub Desktop.
def self.scrape_product
@scraping_block.each do |ele|
name = ele.css("a.desc").text.strip
series = ele.css("div.sub ul li").text.strip
product = self.new(name, series)
@@all << product
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment