Simple shortcut for Rake.application.all_tasks
# File lib/hoe/rake.rb, line 42 42: def self.all_tasks 43: Rake.application.all_tasks 44: 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 50 50: def self.clear_tasks(*tasks) 51: tasks.flatten.each do |name| 52: case name 53: when Regexp then 54: all_tasks.delete_if { |k,_| k =~ name } 55: else 56: all_tasks.delete(name) 57: end 58: end 59: 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 69 69: def self.undo(*names) 70: names.each do |name| 71: all_tasks[name].actions.delete_at(1) 72: end 73: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.