Created
June 22, 2011 20:59
-
-
Save arockwell/1041176 to your computer and use it in GitHub Desktop.
second iteration of rakefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| files = [ | |
| :a_file => "/path/to/a_file", | |
| :b_file => "/path/to/b_file", | |
| :c_file => "/path/to/c_file" | |
| ] | |
| process_tasks = [] | |
| files.each |file_name, file_location| | |
| process_task = "process_#{file_name}".intern | |
| process_tasks << process_task | |
| desc "Process #{file_location}" | |
| task process_task do | |
| process_file(file_name, file_location) | |
| end | |
| end | |
| desc "Process all files" | |
| task :process_all_files => process_tasks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment