Class: Puma::NullIO

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/null_io.rb

Overview

Provides an IO-like object that always appears to contain no data. Used as the value for rack.input when the request has no body.

Instance Method Summary collapse

Instance Method Details

#closeObject

Does nothing



32
33
# File 'lib/puma/null_io.rb', line 32

def close
end

#eachObject

Never yields



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

def each
end

#getsObject

Always returns nil



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

def gets
  nil
end

#read(count) ⇒ Object

Always returns nil



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

def read(count)
  nil
end

#rewindObject

Does nothing



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

def rewind
end