Class: Debtective::Todos::Find

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

Overview

Find and investigate todo comments and return a list of todos

Constant Summary collapse

TODO_REGEX =
/#\sTODO:/

Instance Method Summary collapse

Constructor Details

#initialize(paths) ⇒ Find

Returns a new instance of Find.

Parameters:

  • paths (Array<String>)


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

def initialize(paths)
  @paths = paths
end

Instance Method Details

#callArray<Debtective::Todos::Todo>

Returns:



18
19
20
# File 'lib/debtective/todos/find.rb', line 18

def call
  ruby_pathnames.flat_map { pathname_todos(_1) }
end