Re: [MacRuby-devel] Objective-C-style selectors and define_method

2010-09-17 Thread Laurent Sansonetti
On Sep 16, 2010, at 8:43 PM, Caio Chassot wrote: > On 2010-09-16, at 22:43 , Laurent Sansonetti wrote: >> >> >> Nope, seems good :) I would however pass :"foo:bar:" instead. I believe >> MacRuby will add the trailing : for you but it's clearer to be explicit here. > > Oh, actually I tried that

Re: [MacRuby-devel] Objective-C-style selectors and define_method

2010-09-16 Thread Caio Chassot
On 2010-09-16, at 22:43 , Laurent Sansonetti wrote: > > > Nope, seems good :) I would however pass :"foo:bar:" instead. I believe > MacRuby will add the trailing : for you but it's clearer to be explicit here. Oh, actually I tried that first, and it added a second :, and failed. ___

Re: [MacRuby-devel] Objective-C-style selectors and define_method

2010-09-16 Thread Laurent Sansonetti
Hi Caio, On Sep 16, 2010, at 2:00 PM, Caio Chassot wrote: > Hi, > > Can I define Objective-style interspersed-selector methods dynamically with > define_method? > > I did this: > >class Foo > # def foo(a, bar:b); puts a, b end > define_method :"foo:bar" do |a, b| puts a, b end