Module: Feedzirra::FeedEntryUtilities

Defined in:
lib/content_scrapper/feedzirra.rb

Instance Method Summary collapse

Instance Method Details

#scrap_content(scrapper = ContentScrapper.default, options = {}) ⇒ Object

Scrap the content based on the URL and the existing content and return it



9
10
11
# File 'lib/content_scrapper/feedzirra.rb', line 9

def scrap_content(scrapper = ContentScrapper.default, options = {})
  scrapper.scrap_content(self.url, options) || self.content.to_s
end

#scrap_content!(scrapper = ContentScrapper.default, options = {}) ⇒ Object

Scrap the content or use the existing one and change the feed entry



14
15
16
# File 'lib/content_scrapper/feedzirra.rb', line 14

def scrap_content!(scrapper = ContentScrapper.default, options = {})
  self.content = scrap_content(scrapper, options)
end