Parent

Class Index [+]

Quicksearch

Merb::Rack::StreamWrapper

Public Class Methods

new(body) click to toggle source

:api: private

   # File lib/merb-core/rack/stream_wrapper.rb, line 6
6:       def initialize(body)
7:          @body = body
8:       end

Public Instance Methods

==(other) click to toggle source

:api: private

    # File lib/merb-core/rack/stream_wrapper.rb, line 38
38:       def ==(other)
39:         @body == other
40:       end
each(&callback) click to toggle source

:api: private

    # File 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:         elsif @body.nil?
18:           @body.to_s.each_line(&callback)
19:         elsif @body.is_a?(Integer)
20:           @body.to_s.each_line(&callback)
21:         else
22:           @body.each(&callback)
23:         end
24:       end
method_missing(sym, *args, &blk) click to toggle source

:api: private

    # File lib/merb-core/rack/stream_wrapper.rb, line 43
43:       def method_missing(sym, *args, &blk)
44:         @body.send(sym, *args, &blk)
45:       end
to_s() click to toggle source

:api: private

    # File lib/merb-core/rack/stream_wrapper.rb, line 33
33:       def to_s
34:         @body.to_s
35:       end
write(str) click to toggle source

:api: private

    # File lib/merb-core/rack/stream_wrapper.rb, line 27
27:       def write(str)
28:         @writer.call str.to_s
29:         str
30:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.