Class: NewsScraper::Extractors::Article
- Inherits:
-
Object
- Object
- NewsScraper::Extractors::Article
- Includes:
- NewsScraper::ExtractorsHelpers
- Defined in:
- lib/news_scraper/extractors/article.rb
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(url:) ⇒ Article
constructor
A new instance of Article.
Methods included from NewsScraper::ExtractorsHelpers
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
#extract ⇒ Object
12 13 14 |
# File 'lib/news_scraper/extractors/article.rb', line 12 def extract http_request(@url).body end |