Class: NewsScraper::Extractors::Article

Inherits:
Object
  • Object
show all
Includes:
NewsScraper::ExtractorsHelpers
Defined in:
lib/news_scraper/extractors/article.rb

Instance Method Summary collapse

Methods included from NewsScraper::ExtractorsHelpers

#http_request

Constructor Details

#initialize(url:) ⇒ Article

Returns a new instance of Article.



8
9
10
# File 'lib/news_scraper/extractors/article.rb', line 8

def initialize(url:)
  @url = url
end

Instance Method Details

#extractObject



12
13
14
# File 'lib/news_scraper/extractors/article.rb', line 12

def extract
  http_request(@url).body
end