Skip to content

Instantly share code, notes, and snippets.

@jodell
Created December 16, 2009 02:11
Show Gist options
  • Save jodell/257525 to your computer and use it in GitHub Desktop.
Save jodell/257525 to your computer and use it in GitHub Desktop.
##
# Contribution to Rake::Task to allow for reseting the known invoked state.
# Sometimes you have a complicated Rake setup and looping constructs inside of
# an executing rake task make sense.
# - jodell 20090413
#
class Rake::Task
attr_accessor :already_invoked
def reset_prerequisites
unless @prerequisites.empty? then
@prerequisites.each { |task| application[task, @scope].reset_prerequisites }
end
self.already_invoked = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment