Sha256: 28640ff127743417f4800236d1ebc22d96c9d12de2559b9de904ba5606a23cb3
Contents?: true
Size: 462 Bytes
Versions: 3
Compression:
Stored size: 462 Bytes
Contents
class Knjappserver::CustomIO < StringIO def print(str) str = str.to_s appsrv = Thread.current[:knjappserver] if appsrv and cgroup = appsrv[:contentgroup] and httpsession = appsrv[:httpsession] httpsession.add_size(str.size) cgroup.write(str) else STDOUT.print(str) if !STDOUT.closed? end end def puts(str) res = self.print(str) self.print "\n" return res end alias << print alias write print alias p print end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
knjappserver-0.0.30 | lib/include/class_customio.rb |
knjappserver-0.0.29 | lib/include/class_customio.rb |
knjappserver-0.0.28 | lib/include/class_customio.rb |