# You can move a method from one instance to another within th

**URL:** <https://www.ruby-forum.com/t/you-can-move-a-method-from-one-instance-to-another-within-th/70051>\
**Category:** Ruby\
**Created:** [September 26, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/you-can-move-a-method-from-one-instance-to-another-within-th/70051 "2006-09-26T16:25:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noagenda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8c91f0/32.png) [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Post date:** [September 26, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/you-can-move-a-method-from-one-instance-to-another-within-th/70051/1 "2006-09-26T16:25:02Z")

</div>

You can take a method from one instance and move it to another instance  
with

me = cls.method(:mymthd) \<== get hold of the method  
unbnd = me.unbind \<== unbind it from the class  
newinst = NewClass.new \<== create instance of a subclass of cls  
unbnd.bind(newinst).call \<== bind the method to the instance of  
NewClass

I know it isn’t copying it but is shows the mobility of unbound  
methods. Not sure if you can copy it while it is an unbound method?
