Skip to content

Instantly share code, notes, and snippets.

@cehoffman
Created March 11, 2010 05:52
Show Gist options
  • Save cehoffman/328882 to your computer and use it in GitHub Desktop.
Save cehoffman/328882 to your computer and use it in GitHub Desktop.
Rake::TaskManager.class_eval do
def remove_task(*task_name)
[*task_name].each { |task| @tasks.delete(task.to_s) }
end
def rename_task(old_name, new_name)
old = @tasks.delete old_name.to_s
old.instance_variable_set :@name, new_name.to_s
@tasks[new_name.to_s] = old
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment