Class: Rake::TaskLib

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

Overview

Base class for Task Libraries.

Direct Known Subclasses

PackageTask, RDocTask, TestTask

Instance Method Summary collapse

Instance Method Details

#cloneObject

Make a copy of a task.



9
10
11
12
13
14
15
16
# File 'lib/rake/tasklib.rb', line 9

def clone
  sibling = self.class.new
  instance_variables.each do |ivar|
	value = self.instance_variable_get(ivar)
	sibling.instance_variable_set(ivar, value.dup) if value
  end
  sibling
end

#paste(a, b) ⇒ Object

Make a symbol by pasting two strings together.



19
20
21
# File 'lib/rake/tasklib.rb', line 19

def paste(a,b)
  (a.to_s + b.to_s).intern
end