Class: HurriyetCli::Articles
- Inherits:
-
Object
- Object
- HurriyetCli::Articles
- Defined in:
- lib/hurriyet_cli/articles.rb
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(client, display = STDOUT) ⇒ Articles
constructor
A new instance of Articles.
- #top_articles(top) ⇒ Object
Constructor Details
#initialize(client, display = STDOUT) ⇒ Articles
Returns a new instance of Articles.
3 4 5 6 |
# File 'lib/hurriyet_cli/articles.rb', line 3 def initialize(client, display = STDOUT) @client = client @display = display end |
Instance Method Details
#fetch ⇒ Object
8 9 10 11 |
# File 'lib/hurriyet_cli/articles.rb', line 8 def fetch articles = @client.articles.all formated_parse(articles) end |
#top_articles(top) ⇒ Object
13 14 15 16 |
# File 'lib/hurriyet_cli/articles.rb', line 13 def top_articles(top) articles = @client.articles.all top: top formated_parse(articles) end |