Module: Rake

### Home Classes Methods

### In Files

- lib/hoe/rake.rb

### Namespace

- MODULE Rake::TaskManager
- CLASS Rake::Task

### Methods

- ::all_tasks
- ::clear_tasks
- ::undo

### Files

- History.txt
- Manifest.txt

### Class/Module Index

Quicksearch

- Hoe
- Hoe::Clean
- Hoe::Compiler
- Hoe::Debug
- Hoe::Deps
- Hoe::Flay
- Hoe::Flog
- Hoe::GemPreludeSucks
- Hoe::Gemcutter
- Hoe::Inline
- Hoe::Newb
- Hoe::Package
- Hoe::Publish
- Hoe::RCov
- Hoe::Racc
- Hoe::RubyForge
- Hoe::Signing
- Hoe::Test
- Rake
- Rake::Task
- Rake::TaskManager
- File
- Object
- String

No matching classes.

# Rake

### Public Class Methods

all_tasks() click to toggle source

Simple shortcut for Rake.application.all_tasks

    # File lib/hoe/rake.rb, line 42
    def self.all_tasks
      Rake.application.all_tasks
    end

clear_tasks(*tasks) click to toggle source

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
    def self.clear_tasks(*tasks)
      tasks.flatten.each do |name|
        case name
        when Regexp then
          all_tasks.delete_if { |k,_| k =~ name }
        else
          all_tasks.delete(name)
        end
      end
    end

undo(*names) click to toggle source

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
    def self.undo(*names)
      names.each do |name|
        all_tasks[name].actions.delete_at(-1)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.