I've got some input files which I want to encode using Ruby. The output from the encoding should match some pattern based on the filename of the input file. In order to not do this by hand, I want to use Rake as help for automation. Further I'd like to not specify a single task for every input file.
I've tried some FileList "magic" but it didn't work out. Here's the code:
desc 'Create all output from specified input'
task :encode do
FileList['input/*.txt'].each {|input| file "output/output_#{input}" => input}
end
Anyone can help? I didn't find find anything on the web about multiple output files as dependency.