DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
A Simple Util For Hacking Rails On Windows
This a simple redish util, that i'm using while hacking my way through rails libs directory. (*nix guys has their natural power tools)
found_files = Dir.glob( ARGV[0] + "/**/*.rb")
serach_pattern = Regexp.new( ARGV[1] )
for entry in found_files
file = File.new(entry,"r")
line_count=0
file.readlines.each { |line|
line_count+=1
puts "#{entry}[#{line_count}]:#{line}" if serach_pattern.match(line)
}
end





