Skip to content

Instantly share code, notes, and snippets.

@nobu
Last active January 7, 2016 01:50
Show Gist options
  • Save nobu/b65e495f2164fe08780a to your computer and use it in GitHub Desktop.
Save nobu/b65e495f2164fe08780a to your computer and use it in GitHub Desktop.
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