Last active
January 7, 2016 01:50
-
-
Save nobu/b65e495f2164fe08780a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body = Class.new do | |
def initialize; @is_open = true end | |
def each; yield "hello" end | |
def close; @is_open = false end | |
def call | |
if @is_open | |
[500, {}, ["close not called"]] | |
else | |
[200, {}, self] | |
end | |
end | |
end.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment