Class: Hayabusa::Custom_io
- Inherits:
-
StringIO
- Object
- StringIO
- Hayabusa::Custom_io
- Defined in:
- lib/hayabusa_custom_io.rb
Instance Method Summary collapse
- #print(str) ⇒ Object (also: #<<, #write, #p)
- #puts(str) ⇒ Object
Instance Method Details
#print(str) ⇒ Object Also known as: <<, write, p
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/hayabusa_custom_io.rb', line 2 def print(str) str = str.to_s if appsrv = Thread.current[:hayabusa] 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 |
#puts(str) ⇒ Object
13 14 15 16 17 |
# File 'lib/hayabusa_custom_io.rb', line 13 def puts(str) res = self.print(str) self.print "\n" return res end |