Sha256: 8a8a66c69ad75bafd488f30d38573414ef438078ed4c6faa1fdf8549dc220c86

Contents?: true

Size: 457 Bytes

Versions: 24

Compression:

Stored size: 457 Bytes

Contents

module Puma

  # 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.
  #
  class NullIO

    # Always returns nil
    #
    def gets
      nil
    end

    # Never yields
    #
    def each
    end

    # Always returns nil
    #
    def read(count)
      nil
    end

    # Does nothing
    #
    def rewind
    end

    # Does nothing
    #
    def close
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
puma-1.2.2-java lib/puma/null_io.rb
puma-1.2.2 lib/puma/null_io.rb
puma-1.2.1-java lib/puma/null_io.rb
puma-1.2.1 lib/puma/null_io.rb
puma-1.2.0-java lib/puma/null_io.rb
puma-1.2.0 lib/puma/null_io.rb
puma-1.1.1-java lib/puma/null_io.rb
puma-1.1.1 lib/puma/null_io.rb
puma-1.1.0-java lib/puma/null_io.rb
puma-1.1.0 lib/puma/null_io.rb
puma-1.0.0-java lib/puma/null_io.rb
puma-1.0.0 lib/puma/null_io.rb
puma-0.9.5-java lib/puma/null_io.rb
puma-0.9.5 lib/puma/null_io.rb
puma-0.9.4-java lib/puma/null_io.rb
puma-0.9.4 lib/puma/null_io.rb
puma-0.9.3-java lib/puma/null_io.rb
puma-0.9.3 lib/puma/null_io.rb
puma-0.9.2-java lib/puma/null_io.rb
puma-0.9.2 lib/puma/null_io.rb