In Files

Methods

Rake::Cloneable

                                                                  

Mixin for creating easily cloned objects.

Public Instance Methods

clone() click to toggle source
     # File lib/rake.rb, line 302
302:     def clone
303:       sibling = dup
304:       sibling.freeze if frozen?
305:       sibling
306:     end
dup() click to toggle source

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

     # File lib/rake.rb, line 291
291:     def dup
292:       sibling = self.class.new
293:       instance_variables.each do |ivar|
294:         value = self.instance_variable_get(ivar)
295:         new_value = value.clone rescue value
296:         sibling.instance_variable_set(ivar, new_value)
297:       end
298:       sibling.taint if tainted?
299:       sibling
300:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.