Class: Object

Inherits:
BasicObject
Defined in:
lib/filigree/object.rb

Overview

Object class extras.

Instance Method Summary collapse

Instance Method Details

#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