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