Class: HurriyetCli::Pages

Inherits:
Object
  • Object
show all
Defined in:
lib/hurriyet_cli/pages.rb

Instance Method Summary collapse

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

#fetchObject



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