ruby/spec/mspec/tool/find.rb

11 строки
202 B
Ruby
Executable File

#!/usr/bin/env ruby
Dir.chdir('../rubyspec') do
regexp = Regexp.new(ARGV[0])
Dir.glob('**/*.rb') do |file|
contents = File.read(file)
if regexp =~ contents
puts file
end
end
end