Daniel Schierbeck wrote: > class Object > def quacks_like? (klass) > klass.public_instance_methods.each do |method| > return false unless respond_to? method > end > return true > end > end Austin's post answers your question, but I'd just like to point out that this method could more cleanly be implemented as: class Object def quacks_like? (klass) klass.public_instance_methods.all? { |method| respond_to? method } end end