Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created June 22, 2011 20:59
Show Gist options
  • Select an option

  • Save arockwell/1041176 to your computer and use it in GitHub Desktop.

Select an option

Save arockwell/1041176 to your computer and use it in GitHub Desktop.
second iteration of rakefile
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