Class
PhusionPassenger::Utils::PseudoIO

In: | lib/phusion_passenger/utils.rb
Parent: | Object

Methods

- done!
- method_missing
- new
- respond_to?

Public Class methods
new(sink)

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 205
    205:                 def initialize(sink)
    206:                         @sink = sink || File.open("/dev/null", "w")
    207:                         @buffer = StringIO.new
    208:                 end

Public Instance methods
done!()

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 210
    210:                 def done!
    211:                         result = @buffer.string
    212:                         @buffer = nil
    213:                         return result
    214:                 end

method_missing(*args, &block)

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 216
    216:                 def method_missing(*args, &block)
    217:                         @buffer.send(*args, &block) if @buffer && args.first != :reopen
    218:                         return @sink.send(*args, &block)
    219:                 end

respond_to?(symbol, include_private = false)

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 221
    221:                 def respond_to?(symbol, include_private = false)
    222:                         return @sink.respond_to?(symbol, include_private)
    223:                 end