Class: Tmxnews::Article
- Inherits:
-
Object
- Object
- Tmxnews::Article
- Defined in:
- lib/tmxnews/article.rb
Constant Summary collapse
- @@all =
[]
Class Method Summary collapse
Class Method Details
.articles ⇒ Object
5 6 7 8 9 |
# File 'lib/tmxnews/article.rb', line 5 def self.articles @@all << Tmxnews::Scraper.scrape_nyt @@all << Tmxnews::Scraper.scrape_wsj @@all end |
.list_articles ⇒ Object
11 12 13 14 15 16 |
# File 'lib/tmxnews/article.rb', line 11 def self.list_articles articles.each.with_index(1) do |article, i| puts "#{i}. #{article.title}" puts end end |