Class: Ape::Printwriter

Inherits:
Object
  • Object
show all
Defined in:
lib/ape/print_writer.rb

Overview

this is a wrapper for the weird derived-from-PrintWriter class that comes out of HttpResponse.getWriter

Instance Method Summary collapse

Constructor Details

#initialize(java_writer) ⇒ Printwriter

Returns a new instance of Printwriter.



7
8
9
# File 'lib/ape/print_writer.rb', line 7

def initialize(java_writer)
  @w = java_writer
end

Instance Method Details

#<<(s) ⇒ Object



15
16
17
# File 'lib/ape/print_writer.rb', line 15

def << (s)
  @w.print s
end

#puts(s) ⇒ Object



11
12
13
# File 'lib/ape/print_writer.rb', line 11

def puts(s)
  @w.println s 
end