Class: Rake::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/rename.rb

Instance Method Summary collapse

Instance Method Details

#rename_task(task, oldname, newname) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rake/rename.rb', line 5

def rename_task(task, oldname, newname)
    if @tasks.nil?
    @tasks = {}
    end

    @tasks[newname.to_s] = task

    if @tasks.has_key? oldname
    @tasks.delete oldname
    end
end