Method: Object#clone_with

Defined in:
lib/filigree/object.rb

#clone_with(&block) ⇒ Object

A copy and modification helper.

Returns:

  • (Object)

    A copy of the object with the block evaluated in the context of the copy.



37
38
39
# File 'lib/filigree/object.rb', line 37

def clone_with(&block)
	self.clone.tap { |clone| clone.instance_exec(&block) }
end