Module | Rake::Cloneable
In: | lib/rake.rb

########################################################################## Mixin for creating easily cloned objects.

### Methods

clone dup

### Public Instance methods

clone()

Clone an object by making a new object and setting all the instance variables to the same values.

[Source]

         # File lib/rake.rb, line 269
    269:     def clone
    270:       sibling = self.class.new
    271:       instance_variables.each do |ivar|
    272:         value = self.instance_variable_get(ivar)
    273:         new_value = value.clone rescue value
    274:         sibling.instance_variable_set(ivar, new_value)
    275:       end
    276:       sibling
    277:     end

dup()

Alias for clone

[Validate]