Class: Fack
- Inherits:
-
Object
- Object
- Fack
- Defined in:
- lib/fack.rb
Instance Method Summary collapse
Instance Method Details
#help ⇒ Object
4 5 6 |
# File 'lib/fack.rb', line 4 def help puts "To use: fack <search_string>" end |
#print_check(a, b) ⇒ Object
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 |
#print_find(start, file) ⇒ Object
14 15 16 |
# File 'lib/fack.rb', line 14 def print_find(start, file) Dir.glob('**/*') { |f| print_check(f, file) } end |