Class: Rake::TaskLib
- Inherits:
-
Object
- Object
- Rake::TaskLib
- Defined in:
- lib/rake/tasklib.rb
Overview
Base class for Task Libraries.
Direct Known Subclasses
Instance Method Summary collapse
-
#clone ⇒ Object
Make a copy of a task.
-
#paste(a, b) ⇒ Object
Make a symbol by pasting two strings together.
Instance Method Details
#clone ⇒ Object
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 |