Class: Debtective::Todos::Build

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

Overview

Find the todos comments and their boundaries

Constant Summary collapse

BEFORE_LINE_TODO_REGEX =
/^\s*#\sTODO:\s/
INLINE_TODO_REGEX =
/\s*#\sTODO:\s/
COMMENT_REGEX =
/\s*#/

Instance Method Summary collapse

Constructor Details

#initialize(pathname, index) ⇒ Build

Returns a new instance of Build.

Parameters:

  • pathname (Pathname)
  • index (Integer)


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

def initialize(pathname, index)
  @pathname = pathname
  @index = index
end

Instance Method Details

#callDebtective::Todos::Todo



23
24
25
26
27
28
29
30
# File 'lib/debtective/todos/build.rb', line 23

def call
  Debtective::Todos::Todo.new(
    @pathname,
    lines,
    todo_boundaries,
    statement_boundaries
  )
end