Class: Clone
- Inherits:
-
Object
- Object
- Clone
- Defined in:
- lib/Clone.rb
Overview
Note:
Not currently in use due to bug where “send” needs to be called directly on object, not indirectly through clone which results in “undefined method”.
A clone of the instance that a reflection calls methods on, as well as any other instances that those methods may lead to.
Instance Method Summary collapse
- #action(method, *new_args) ⇒ Object
-
#initialize(execution) ⇒ Clone
constructor
A new instance of Clone.
Constructor Details
#initialize(execution) ⇒ Clone
Returns a new instance of Clone.
17 18 19 20 21 22 23 24 25 |
# File 'lib/Clone.rb', line 17 def initialize(execution) # Clone the execution's calling object. @caller_object_clone = execution.caller_object.clone # TODO: Clone any other instances that this clone references. # TODO: Replace clone's references to these new instances. end |
Instance Method Details
#action(method, *new_args) ⇒ Object
27 28 29 |
# File 'lib/Clone.rb', line 27 def action(method, *new_args) @caller_object_clone.send(method, *new_args) end |