Skip to content

Instantly share code, notes, and snippets.

@heftig
Created January 26, 2012 12:40
Show Gist options
  • Save heftig/1682594 to your computer and use it in GitHub Desktop.
Save heftig/1682594 to your computer and use it in GitHub Desktop.
class Enumerator
class Do < BasicObject
def initialize(enum)
@enum = enum
end
def method_missing(meth, *args, &blk)
@enum.each do |x|
x.send(meth, *args, &blk)
end
end
end
def do
Do.new(self)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment