123456789_123456789_123456789_123456789_123456789_

Class: Puma::NullIO

Relationships & Source Files
Inherits: Object
Defined in: lib/puma/null_io.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#eof?Boolean (readonly)

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 31

def eof?
  true
end

#sync=(v) (writeonly)

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 35

def sync=(v)
end

Instance Method Details

#close

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 24

def close
end

#each

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 12

def each
end

#gets

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 8

def gets
  nil
end

#puts(*ary)

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 38

def puts(*ary)
end

#read(count = nil, _buffer = nil)

Mimics IO#read with no data.

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 17

def read(count = nil, _buffer = nil)
  (count && count > 0) ? nil : ""
end

#rewind

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 21

def rewind
end

#size

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 27

def size
  0
end

#write(*ary)

[ GitHub ]

  
# File 'lib/puma/null_io.rb', line 41

def write(*ary)
end