Simple shortcut for Rake.application.all_tasks
# File lib/hoe/rake.rb, line 26 26: def self.all_tasks 27: Rake.application.all_tasks 28: end
Hooks into rake and allows us to clear out a task by name or regexp. Use this if you want to completely override a task instead of extend it.
# File lib/hoe/rake.rb, line 34 34: def self.clear_tasks(*tasks) 35: tasks.flatten.each do |name| 36: case name 37: when Regexp then 38: all_tasks.delete_if { |k,_| k =~ name } 39: else 40: all_tasks.delete(name) 41: end 42: end 43: end
Removes the last action added to a task. Use this when two libraries define the same task and you only want one of the actions.
require 'hoe' require 'tasks/rails' Rake.undo("test") # rolls out rails' test task
# File lib/hoe/rake.rb, line 53 53: def self.undo(*names) 54: names.each do |name| 55: all_tasks[name].actions.delete_at(1) 56: end 57: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.