Class: Fack

Inherits:
Object
  • Object
show all
Defined in:
lib/fack.rb

Instance Method Summary collapse

Instance Method Details

#helpObject



4
5
6
# File 'lib/fack.rb', line 4

def help
  puts "To use: fack <search_string>"
end


8
9
10
11
12
# File 'lib/fack.rb', line 8

def print_check(a, b)
  if a.include? b
    puts a.gsub(/#{b}/, b.colorize(:red))
  end
end


14
15
16
# File 'lib/fack.rb', line 14

def print_find(start, file)
  Dir.glob('**/*') { |f| print_check(f, file) }
end