Sha256: f468900cdeda60611078315ea54a40574d7b21d957ae46a09184882fd77be241

Contents?: true

Size: 466 Bytes

Versions: 26

Compression:

Stored size: 466 Bytes

Contents

class Hayabusa::Custom_io < StringIO
  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
  
  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

26 entries across 26 versions & 1 rubygems

Version Path
hayabusa-0.0.30 lib/hayabusa_custom_io.rb
hayabusa-0.0.29 lib/hayabusa_custom_io.rb
hayabusa-0.0.28 lib/hayabusa_custom_io.rb
hayabusa-0.0.25 lib/hayabusa_custom_io.rb
hayabusa-0.0.24 lib/hayabusa_custom_io.rb
hayabusa-0.0.23 lib/hayabusa_custom_io.rb
hayabusa-0.0.22 lib/hayabusa_custom_io.rb
hayabusa-0.0.20 lib/hayabusa_custom_io.rb
hayabusa-0.0.19 lib/hayabusa_custom_io.rb
hayabusa-0.0.18 lib/hayabusa_custom_io.rb
hayabusa-0.0.17 lib/hayabusa_custom_io.rb
hayabusa-0.0.16 lib/hayabusa_custom_io.rb
hayabusa-0.0.15 lib/hayabusa_custom_io.rb
hayabusa-0.0.14 lib/hayabusa_custom_io.rb
hayabusa-0.0.13 lib/hayabusa_custom_io.rb
hayabusa-0.0.12 lib/hayabusa_custom_io.rb
hayabusa-0.0.11 lib/hayabusa_custom_io.rb
hayabusa-0.0.10 lib/hayabusa_custom_io.rb
hayabusa-0.0.9 lib/hayabusa_custom_io.rb
hayabusa-0.0.8 lib/hayabusa_custom_io.rb