Class: Reflekt::Clone
- Inherits:
-
Object
- Object
- Reflekt::Clone
- Defined in:
- lib/clone.rb
Instance Method Summary collapse
- #action(method, *new_args) ⇒ Object
-
#initialize(action) ⇒ Clone
constructor
A new instance of Clone.
Constructor Details
#initialize(action) ⇒ Clone
Returns a new instance of Clone.
18 19 20 21 22 23 24 |
# File 'lib/clone.rb', line 18 def initialize(action) # Clone the action's calling object. @caller_object_clone = action.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
26 27 28 |
# File 'lib/clone.rb', line 26 def action(method, *new_args) @caller_object_clone.send(method, *new_args) end |