Class: Notes::CLI
- Inherits:
-
Object
- Object
- Notes::CLI
- Defined in:
- lib/notes-cli/cli.rb
Instance Method Summary collapse
-
#find_all ⇒ Object
Read and parse all files as specified in the options Prints filenames along with all tasks found per file Only outputs to console; returns nothing.
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
Instance Method Details
#find_all ⇒ Object
Read and parse all files as specified in the options Prints filenames along with all tasks found per file Only outputs to console; returns nothing
11 12 13 14 15 16 17 18 19 |
# File 'lib/notes-cli/cli.rb', line 11 def find_all task_map = Notes::Tasks.all(@options).group_by(&:filename) task_map.each do |filename, tasks| puts "#{filename}:" tasks.each { |task| puts ' ' + task.to_s } puts '' end end |