Class: NoteLister

Inherits:
Object
  • Object
show all
Includes:
Modules::ResourceUtils
Defined in:
lib/notes_cli/services/note_lister.rb

Instance Method Summary collapse

Methods included from Modules::ResourceUtils

#config, #create?, #current_workspace, #notebook_exists?, #notebook_path, #notes_folder, #workspace_exists?, #workspace_path

Constructor Details

#initialize(notebook) ⇒ NoteLister

Returns a new instance of NoteLister.



6
7
8
# File 'lib/notes_cli/services/note_lister.rb', line 6

def initialize(notebook)
  @notebook = notebook
end

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/notes_cli/services/note_lister.rb', line 10

def call
  handle_errors
  return list if entries.any?

  empty_notebook_notification
end