Skip to content

Instantly share code, notes, and snippets.

@learnist
Created September 6, 2008 00:16
Show Gist options
  • Save learnist/9060 to your computer and use it in GitHub Desktop.
Save learnist/9060 to your computer and use it in GitHub Desktop.
RecursiveEnumerator.new(self) do |klass|
klass.superclass.respond_to?(:foobar) ? klass.superclass : break
end
RecursiveFind.new(self) do |klass|
klass.superclass.respond_to?(:foobar) ? klass.superclass : break
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment