Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created May 31, 2011 18:02
Show Gist options
  • Select an option

  • Save rramsden/1000982 to your computer and use it in GitHub Desktop.

Select an option

Save rramsden/1000982 to your computer and use it in GitHub Desktop.
class A
def initialize
@stub = lambda {|&block| [1,2,3,4].each{|n| block.call(n)}}
end
def each(&block)
@stub.call(&block)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment