class ToDo::Finder
Finds text in to-dos entries. Relies on system's `find' and `grep' commands.
Attributes
context[R]
query[R]
Public Class Methods
new(context:, query:)
click to toggle source
# File lib/finder.rb, line 10 def initialize(context:, query:) @context = context @query = query end
Public Instance Methods
find()
click to toggle source
# File lib/finder.rb, line 15 def find system("find #{context.dir_path} -type f | xargs grep -Hni \"#{query}\"") end