提交 ddd804e8 编写于 作者: R Rafael Mendonça França

Merge pull request #7204 from frodsan/update_conventions

Follow code conventions in metal/live
...@@ -47,13 +47,13 @@ def write(string) ...@@ -47,13 +47,13 @@ def write(string)
def each def each
while str = @buf.pop while str = @buf.pop
yield str yield(str)
end end
end end
def close def close
super super
@buf.push nil @buf.push(nil)
end end
end end
...@@ -78,7 +78,7 @@ def to_hash ...@@ -78,7 +78,7 @@ def to_hash
end end
def initialize(status = 200, header = {}, body = []) def initialize(status = 200, header = {}, body = [])
header = Header.new self, header header = Header.new(self, header)
super(status, header, body) super(status, header, body)
end end
...@@ -89,11 +89,11 @@ def commit! ...@@ -89,11 +89,11 @@ def commit!
private private
def build_buffer(response, body) def build_buffer(response, body)
buf = Live::Buffer.new response buf = Live::Buffer.new(response)
body.each { |part| buf.write part } body.each { |part| buf.write(part) }
buf buf
end end
end end
def process(name) def process(name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册