Class: Debtective::Todos::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/debtective/todos/output.rb

Overview

Generate todolist

Constant Summary collapse

FILE_PATH =
"todos.json"

Instance Method Summary collapse

Constructor Details

#initialize(user_name = nil, quiet: false) ⇒ Output

Returns a new instance of Output.

Parameters:

  • user_name (String) (defaults to: nil)

    git user email to filter



13
14
15
16
# File 'lib/debtective/todos/output.rb', line 13

def initialize(user_name = nil, quiet: false)
  @user_name = user_name
  @quiet = quiet
end

Instance Method Details

#callvoid

This method returns an undefined value.



19
20
21
22
23
24
25
26
27
28
# File 'lib/debtective/todos/output.rb', line 19

def call
  @list = log_table
  @list ||= Debtective::Todos::List.new(Debtective.configuration&.paths || ["./**/*"])
  filter_list!
  log_counts
  update_json_file
  return if @quiet

  puts FILE_PATH
end