Sha256: 8397a8d2bbfb9efecf8937efb50eaf30b3300f2676b8343fece1f61190caaf74
Contents?: true
Size: 455 Bytes
Versions: 9
Compression:
Stored size: 455 Bytes
Contents
#!/usr/bin/env ruby module Rake # Base class for Task Libraries. class TaskLib # Make a copy of a task. 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 # Make a symbol by pasting two strings together. def paste(a,b) (a.to_s + b.to_s).intern end end end
Version data entries
9 entries across 9 versions & 1 rubygems