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 515
    515:                 def initialize(sink)
    516:                         @sink = sink || File.open("/dev/null", "w")
    517:                         @buffer = StringIO.new
    518:                 end

Public Instance methods
done!()

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 520
    520:                 def done!
    521:                         result = @buffer.string
    522:                         @buffer = nil
    523:                         return result
    524:                 end

method_missing(*args, &block)

[ show source ]

         # File lib/phusion_passenger/utils.rb, line 526
    526:                 def method_missing(*args, &block)
    527:                         @buffer.send(*args, &block) if @buffer && args.first != :reopen
    528:                         return @sink.send(*args, &block)
    529:                 end

respond_to?(symbol, include_private = false)

[ show source ]

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