On 19.09.2006 21:16, Jonas Pfenniger wrote:
> I'm sure this can be extended to support a hierarchy :
> 
> class Object
>  def quaks_like?(*args)
>    args.each do |a|
>      return false unless respond_to? a
>    end
>    return true
>  end
> end

def quacks_like?(*args)
   args.all? {|a| respond_to? a}
end

SCNR :-)

	robert