| Class | Merb::Rack::StreamWrapper |
| In: |
merb-core/lib/merb-core/rack/stream_wrapper.rb
|
| Parent: | Object |
:api: private
# File merb-core/lib/merb-core/rack/stream_wrapper.rb, line 6 6: def initialize(body) 7: @body = body 8: end
:api: private
# File merb-core/lib/merb-core/rack/stream_wrapper.rb, line 34
34: def ==(other)
35: @body == other
36: end
:api: private
# File merb-core/lib/merb-core/rack/stream_wrapper.rb, line 11
11: def each(&callback)
12: if Proc === @body
13: @writer = lambda { |x| callback.call(x) }
14: @body.call(self)
15: elsif @body.is_a?(String)
16: @body.each_line(&callback)
17: else
18: @body.each(&callback)
19: end
20: end
:api: private
# File merb-core/lib/merb-core/rack/stream_wrapper.rb, line 39
39: def method_missing(sym, *args, &blk)
40: @body.send(sym, *args, &blk)
41: end
:api: private
# File merb-core/lib/merb-core/rack/stream_wrapper.rb, line 29
29: def to_s
30: @body.to_s
31: end