Class: HurriyetCli::Pages
- Inherits:
-
Object
- Object
- HurriyetCli::Pages
- Defined in:
- lib/hurriyet_cli/pages.rb
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(client, display = STDOUT) ⇒ Pages
constructor
A new instance of Pages.
- #top_pages(top) ⇒ Object
Constructor Details
#initialize(client, display = STDOUT) ⇒ Pages
Returns a new instance of Pages.
3 4 5 6 |
# File 'lib/hurriyet_cli/pages.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/pages.rb', line 8 def fetch pages = @client.pages.all formated_parse(pages) end |
#top_pages(top) ⇒ Object
13 14 15 16 |
# File 'lib/hurriyet_cli/pages.rb', line 13 def top_pages(top) pages = @client.pages.all top: top formated_parse(pages) end |