Created
June 8, 2012 06:50
-
-
Save mschuerig/2894059 to your computer and use it in GitHub Desktop.
Forget a Rake task
This file contains 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
class Rake::Task | |
# Forget an already defined task. | |
# | |
# Rake tasks with the same name are cumulative, | |
# a new definition adds to an already existing one, | |
# it does not override it. | |
# In order to completely redefine a task, this | |
# method makes rake forget the previous definition(s). | |
# | |
def forget | |
prerequisites.clear | |
@actions.clear | |
@comment = nil | |
@full_comment = nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment