class Toothpick::Search
Public Class Methods
new(picks_dir, string)
click to toggle source
# File lib/toothpick/search.rb, line 4 def initialize(picks_dir, string) # Works only with the_silver_searcher for now unless `cd #{picks_dir} && ag --version`.nil? space_separated_filenames = `ag -l #{string}`.split.join(' ') unless space_separated_filenames.empty? system("$EDITOR #{space_separated_filenames}") end end end