Using Rake as a Library


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/env ruby # -*- ruby -*- exts = ['.rb'] if ARGV[0] =~ /^\.[a-zA-Z0-9]+$/ exts = [] while ARGV[0] =~ /^\.[a-zA-Z0-9]+$/ exts << ARGV.shift end end ext = "{" + exts.join(',') + "}" if ARGV.size < 1 puts "Usage: #{File.basename($0)} [.ext ...] pattern ..." exit 1 end require 'rake' FileList["**/*#{ext}"].egrep(Regexp.new(ARGV.join('|')))

URL: http://onestepback.org/index.cgi/Tech/Rake/FindInCode.red

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.