From: Mike Campbell Date: 2002-10-07T06:59:26+09:00 Subject: Re: Another take on ensuring right args to methods > Personally I like #can? but it doesn't help with the awkward two-headed > "obj.meth if obj.can?(:meth)" idiom. > > > class Foo def meth(bar) bar.passes?(TestBar) or raise ArgumentError > > end end Foo.new.meth(1) $ ruby --inline-tests foo.rb > > What does #passes? actually do? I'm guessing it runs some suite of unit tests and returns true IFF all of them pass.