struct

Redis::Parser

Inherits Struct < Value < Object

Constructors

new(io : IO)

Initialize a parser to read from the given IO

Source

Instance methods

read

Read a Redis::Value from the parser's IO

Example:

io = IO::Memory.new
io << "$3\r\n"
io << "foo\r\n"
io.rewind

Parser.new(io).read # => "foo"
Source
read?

Reads a value from the IO, returning nil on EOF.

Source