Da Nedea 12 Februr 2006 22:48 Timothy Hunter napsal:
> the_crazy88 wrote:
>
> In Ruby it's typical to encapsulate bits of code in Proc objects and
> pass these objects around:
>
> p = Proc.new {|x,y} x+y}
>
> p.call(2,3) -> 5
>
> If you're really wanting to pass methods around from one instance to
> another, check out the doc for the UnboundMethod class with ri.

Or use Procs and inject the instance into them as a parameter, which is a bit 
more readable to me.

David Vallner